Skip to content

Instantly share code, notes, and snippets.

@codenoid
Created April 7, 2019 13:37
Show Gist options
  • Select an option

  • Save codenoid/6eb46727163fcec6cba7dc0f113f92fc to your computer and use it in GitHub Desktop.

Select an option

Save codenoid/6eb46727163fcec6cba7dc0f113f92fc to your computer and use it in GitHub Desktop.
gnuradio cannot find usable Python headers
  1. subl configure
  2. i delete from line 21391 to 21425
	# ask distutils which include path we should use
	python_cmd='
import distutils.sysconfig
import os
path = distutils.sysconfig.get_python_inc(plat_specific=False)
if os.sep == "\\":
  path = path.replace("\\", "/")
print(path)
'
	python_path=`$PYTHON -c "$python_cmd"`
	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_path" >&5
$as_echo "$python_path" >&6; }
	if test -z "$python_path" ; then
		as_fn_error $? "cannot find Python include path" "$LINENO" 5
	fi

	PYTHON_CPPFLAGS=-I$python_path


	# Check for Python headers usability
	python_save_CPPFLAGS=$CPPFLAGS
	CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
	for ac_header in Python.h
do :
  ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
if test "$ac_cv_header_Python_h" = xyes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_PYTHON_H 1
_ACEOF

else
  as_fn_error $? "cannot find usable Python headers" "$LINENO" 5
fi

done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment