1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
Upstream move customize_compiler yet again...
http://lists.egenix.com/mailman-archives/egenix-users/2012-April/114841.html
http://hg.python.org/cpython/rev/6240ff5dfebe
https://bugs.gentoo.org/show_bug.cgi?id=412739
Patch written by Kacper Kowalik <xarthisius@gentoo.org>
--- a/mxSetup.py
+++ b/mxSetup.py
@@ -298,10 +298,15 @@
from distutils.command.clean import clean
import distutils.archive_util
+try:
+ from distutils.sysconfig import customize_compiler
+except ImportError:
+ from distutils.ccompiler import customize_compiler
+
if (python_version < '2.7' or
(python_version > '3.0' and python_version < '3.2')):
from distutils.sysconfig import \
- get_config_h_filename, parse_config_h, customize_compiler, \
+ get_config_h_filename, parse_config_h, \
get_config_vars, get_python_version
from distutils.util import get_platform
@@ -313,10 +318,6 @@
get_config_h_filename, parse_config_h, get_path, \
get_config_vars, get_python_version, get_platform
- # This API was moved from distutils.sysconfig to distutils.ccompiler
- # in Python 2.7
- from distutils.ccompiler import customize_compiler
-
def get_python_include_dir():
""" Return the path to the Python include dir.
|