]>
Commit | Line | Data |
---|---|---|
1f2b97ba JR |
1 | commit 46c4205e82efcaf1165df8593eaeb2115eef3056 |
2 | Author: Jan Rękorajski <baggins@pld-linux.org> | |
3 | Date: Sun Apr 24 10:28:38 2016 +0200 | |
4 | ||
5 | Revert "python: make installed modules find by default on Debian and Ubuntu" | |
6 | ||
7 | This reverts commit 1f113f6bc81edabbbda7e14d58b10ac02d7a1137. | |
8 | ||
9 | diff --git a/m4/python.m4 b/m4/python.m4 | |
10 | index 32c30e2..5c58851 100644 | |
11 | --- a/m4/python.m4 | |
12 | +++ b/m4/python.m4 | |
7a960292 JB |
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]) | |
1f2b97ba | 16 | |
7a960292 | 17 | - # Factor out some code duplication into this shell variable. |
1f2b97ba JR |
18 | - am_python_setup_sysconfig="\ |
19 | -import sys | |
20 | -# Prefer sysconfig over distutils.sysconfig, for better compatibility | |
21 | -# with python 3.x. See automake bug#10227. | |
22 | -try: | |
23 | - import sysconfig | |
24 | -except ImportError: | |
25 | - can_use_sysconfig = 0 | |
26 | -else: | |
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> | |
30 | -try: | |
31 | - from platform import python_implementation | |
32 | - if python_implementation() == 'CPython' and sys.version[[:3]] == '2.7': | |
33 | - can_use_sysconfig = 0 | |
34 | -except ImportError: | |
35 | - pass" | |
7a960292 JB |
36 | - |
37 | dnl emacs-page Set up 4 directories: | |
1f2b97ba | 38 | |
7a960292 JB |
39 | dnl 1. pythondir: where to install python scripts. This is the |
40 | @@ -251,14 +231,7 @@ except ImportError: | |
41 | else | |
42 | am_py_prefix=$am_cv_python_prefix | |
43 | fi | |
44 | - am_cv_python_pythondir=`$PYTHON -c " | |
1f2b97ba JR |
45 | -$am_python_setup_sysconfig |
46 | -if can_use_sysconfig: | |
7a960292 | 47 | - sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'}) |
1f2b97ba | 48 | -else: |
7a960292 JB |
49 | - from distutils import sysconfig |
50 | - sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix') | |
1f2b97ba | 51 | -sys.stdout.write(sitedir)"` |
7a960292 JB |
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` |
53 | # | |
54 | case $am_cv_python_pythondir in | |
55 | $am_py_prefix*) | |
56 | @@ -293,14 +266,7 @@ sys.stdout.write(sitedir)"` | |
57 | else | |
58 | am_py_exec_prefix=$am_cv_python_exec_prefix | |
59 | fi | |
60 | - am_cv_python_pyexecdir=`$PYTHON -c " | |
1f2b97ba JR |
61 | -$am_python_setup_sysconfig |
62 | -if can_use_sysconfig: | |
7a960292 | 63 | - sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_exec_prefix'}) |
1f2b97ba | 64 | -else: |
7a960292 JB |
65 | - from distutils import sysconfig |
66 | - sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_exec_prefix') | |
1f2b97ba | 67 | -sys.stdout.write(sitedir)"` |
7a960292 JB |
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` |
69 | # | |
70 | case $am_cv_python_pyexecdir in | |
71 | $am_py_exec_prefix*) |