1 commit 46c4205e82efcaf1165df8593eaeb2115eef3056
2 Author: Jan Rękorajski <baggins@pld-linux.org>
3 Date: Sun Apr 24 10:28:38 2016 +0200
5 Revert "python: make installed modules find by default on Debian and Ubuntu"
7 This reverts commit 1f113f6bc81edabbbda7e14d58b10ac02d7a1137.
9 diff --git a/m4/python.m4 b/m4/python.m4
10 index 32c30e2..5c58851 100644
13 @@ -216,26 +216,6 @@ AC_DEFUN([AM_PATH_PYTHON],
14 # Substituting python_exec_prefix_subst.
15 AC_SUBST([PYTHON_EXEC_PREFIX], [$am_python_exec_prefix_subst])
17 - # Factor out some code duplication into this shell variable.
18 - am_python_setup_sysconfig="\
20 -# Prefer sysconfig over distutils.sysconfig, for better compatibility
21 -# with python 3.x. See automake bug#10227.
25 - can_use_sysconfig = 0
27 - can_use_sysconfig = 1
28 -# Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs:
29 -# <https://github.com/pypa/virtualenv/issues/118>
31 - from platform import python_implementation
32 - if python_implementation() == 'CPython' and sys.version[[:3]] == '2.7':
33 - can_use_sysconfig = 0
37 dnl emacs-page Set up 4 directories:
39 dnl 1. pythondir: where to install python scripts. This is the
40 @@ -251,14 +231,7 @@ except ImportError:
42 am_py_prefix=$am_cv_python_prefix
44 - am_cv_python_pythondir=`$PYTHON -c "
45 -$am_python_setup_sysconfig
46 -if can_use_sysconfig:
47 - sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'})
49 - from distutils import sysconfig
50 - sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix')
51 -sys.stdout.write(sitedir)"`
52 + am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null`
54 case $am_cv_python_pythondir in
56 @@ -293,14 +266,7 @@ sys.stdout.write(sitedir)"`
58 am_py_exec_prefix=$am_cv_python_exec_prefix
60 - am_cv_python_pyexecdir=`$PYTHON -c "
61 -$am_python_setup_sysconfig
62 -if can_use_sysconfig:
63 - sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_exec_prefix'})
65 - from distutils import sysconfig
66 - sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_exec_prefix')
67 -sys.stdout.write(sitedir)"`
68 + am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null`
70 case $am_cv_python_pyexecdir in