]> git.pld-linux.org Git - packages/automake.git/blob - revert-debian-python-hacks.patch
- revert debian python detection hacks that cause misdetection in PLD
[packages/automake.git] / revert-debian-python-hacks.patch
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
13 @@ -106,25 +106,6 @@ AC_DEFUN([AM_PATH_PYTHON],
14      [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`])
15    AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform])
16  
17 -  # Just factor out some code duplication.
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"
36  
37    dnl Set up 4 directories:
38  
39 @@ -141,14 +122,7 @@ except ImportError:
40       else
41         am_py_prefix=$prefix
42       fi
43 -     am_cv_python_pythondir=`$PYTHON -c "
44 -$am_python_setup_sysconfig
45 -if can_use_sysconfig:
46 -    sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'})
47 -else:
48 -    from distutils import sysconfig
49 -    sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix')
50 -sys.stdout.write(sitedir)"`
51 +     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`
52       case $am_cv_python_pythondir in
53       $am_py_prefix*)
54         am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
55 @@ -183,14 +157,7 @@ sys.stdout.write(sitedir)"`
56       else
57         am_py_exec_prefix=$exec_prefix
58       fi
59 -     am_cv_python_pyexecdir=`$PYTHON -c "
60 -$am_python_setup_sysconfig
61 -if can_use_sysconfig:
62 -    sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_prefix'})
63 -else:
64 -    from distutils import sysconfig
65 -    sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix')
66 -sys.stdout.write(sitedir)"`
67 +     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`
68       case $am_cv_python_pyexecdir in
69       $am_py_exec_prefix*)
70         am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
This page took 0.094592 seconds and 4 git commands to generate.