File tree Expand file tree Collapse file tree 4 files changed +13
-13
lines changed Expand file tree Collapse file tree 4 files changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ echo "**** Installing Cffi and dependencies"
3535
3636echo " Checking for Python-Dev"
3737# copied from https://stackoverflow.com/questions/4848566/check-for-existence-of-python-dev-files-from-bash-script
38- if [ ! -e $( python -c ' from distutils. sysconfig import get_makefile_filename as m; print m()' ) ]; then
38+ if [ ! -e $( python -c ' from sysconfig import get_makefile_filename as m; print m()' ) ]; then
3939 echo " On Debian/Ubuntu like system install by 'sudo apt-get python-dev' package."
4040 echo " On Fedora by 'yum install python-devel'"
4141 echo " On Mac OS X by 'brew install python'"
Original file line number Diff line number Diff line change 1616
1717
1818# Install python-devel package if not already available
19- # first, makes sure distutils. sysconfig usable
20- if ! $( python -c " import distutils. sysconfig" & > /dev/null) ; then
21- echo " $0 : WARNING: python library distutils. sysconfig not usable, this is necessary to figure out the path of Python.h." >&2
19+ # first, makes sure sysconfig is usable
20+ if ! $( python -c " import sysconfig" & > /dev/null) ; then
21+ echo " $0 : WARNING: python library sysconfig not usable, this is necessary to figure out the path of Python.h." >&2
2222 echo " Proceeding with installation." >&2
2323else
2424 # get include path for this python version
25- INCLUDE_PY=$( python -c " from distutils import sysconfig as s; print(s.get_python_inc( ))" )
25+ INCLUDE_PY=$( python -c " import sysconfig as s; print(s.get_path('include' ))" )
2626 if [ ! -f " ${INCLUDE_PY} /Python.h" ]; then
2727 echo " $0 : ERROR: python-devel/python-dev not installed" >&2
2828 if which yum >& /dev/null; then
Original file line number Diff line number Diff line change 1515 echo " You must call this script from the tools/ directory" && exit 1;
1616
1717# Install python-devel package if not already available
18- # first, makes sure distutils. sysconfig usable
18+ # first, makes sure sysconfig is usable
1919# We are not currently compiling the bindings by default, but it seems
2020# worth it to keep this section as we do have them and they will
2121# probably be used.
22- if ! $( python -c " import distutils. sysconfig" & > /dev/null) ; then
23- echo " $0 : WARNING: python library distutils. sysconfig not usable, this is necessary to figure out the path of Python.h." >&2
22+ if ! $( python -c " import sysconfig" & > /dev/null) ; then
23+ echo " $0 : WARNING: python library sysconfig not usable, this is necessary to figure out the path of Python.h." >&2
2424 echo " Proceeding with installation." >&2
2525else
2626 # get include path for this python version
27- INCLUDE_PY=$( python -c " from distutils import sysconfig as s; print(s.get_python_inc( ))" )
27+ INCLUDE_PY=$( python -c " import sysconfig as s; print(s.get_path('include' ))" )
2828 if [ ! -f " ${INCLUDE_PY} /Python.h" ]; then
2929 echo " $0 : ERROR: python-devel/python-dev not installed" >&2
3030 if which yum >& /dev/null; then
Original file line number Diff line number Diff line change 1515 echo " You must call this script from the tools/ directory" && exit 1;
1616
1717# Install python-devel package if not already available
18- # first, makes sure distutils. sysconfig usable
19- if ! $( python -c " import distutils. sysconfig" & > /dev/null) ; then
20- echo " $0 : WARNING: python library distutils. sysconfig not usable, this is necessary to figure out the path of Python.h." >&2
18+ # first, makes sure sysconfig is usable
19+ if ! $( python -c " import sysconfig" & > /dev/null) ; then
20+ echo " $0 : WARNING: python library sysconfig not usable, this is necessary to figure out the path of Python.h." >&2
2121 echo " Proceeding with installation." >&2
2222else
2323 # get include path for this python version
24- INCLUDE_PY=$( python -c " from distutils import sysconfig as s; print(s.get_python_inc( ))" )
24+ INCLUDE_PY=$( python -c " import sysconfig as s; print(s.get_path('include' ))" )
2525 if [ ! -f " ${INCLUDE_PY} /Python.h" ]; then
2626 echo " $0 : ERROR: python-devel/python-dev not installed" >&2
2727 if which yum >& /dev/null; then
You can’t perform that action at this time.
0 commit comments