Skip to content

Commit 1709059

Browse files
Dropped use of depricated python3-setuptools / distutils.
Make sure sysconfig.get_path("platlib") return correct path on Debian and Ubuntu systems, where /usr/lib/ should be used over /usr/local/lib. Based on e2c10a8 by Andy Pugh and pull request #3155 by Eckeneckepen. Fixes Debian issue #1080668.
1 parent 673761a commit 1709059

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1684,7 +1684,7 @@ fi
16841684
AC_MSG_RESULT([$PYTHON_TK_VERSION])
16851685

16861686
AC_MSG_CHECKING(for site-package location)
1687-
SITEPY=`$PYTHON -c 'import distutils.sysconfig; print(distutils.sysconfig.get_python_lib())'`
1687+
SITEPY="$($PYTHON -c 'import sysconfig; s = sysconfig.get_scheme_names(); m=list(set(("deb_system", "rpm_prefix")) & set(s)); print(sysconfig.get_path("platlib", m.__getitem__(0))) if m else print("/usr/lib/python3/dist-packages");')"
16881688
AC_MSG_RESULT($SITEPY)
16891689

16901690
AC_MSG_CHECKING(for working GLU quadrics)

src/m4/ax_python.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ if test x$ax_python_bin != x; then
6464
AC_CHECK_LIB(${ax_python_bin}m, main, ax_python_lib=${ax_python_bin}m, ax_python_lib=no)
6565
fi
6666
if test x$ax_python_lib != xno; then
67-
ax_python_header=`$ax_python_bin -c "from distutils.sysconfig import *; print(get_config_var('CONFINCLUDEPY'))"`
67+
ax_python_header=`$ax_python_bin -c "import sysconfig; print(sysconfig.get_path('include'))"`
6868
if test x$ax_python_header != x; then
6969
break;
7070
fi

0 commit comments

Comments
 (0)