[mx] fix FTBFS with python 2.7.3

Dan Horák sharkcz at fedoraproject.org
Tue Jul 3 13:13:39 UTC 2012


commit 5e2449d5e3e7946c68956b5d3aafcb3e7065abdb
Author: Dan Horák <dan at danny.cz>
Date:   Tue Jul 3 15:13:36 2012 +0200

    fix FTBFS with python 2.7.3

 mx-3.2.3-distutils_customize_compiler.patch |   37 +++++++++++++++++++++++++++
 mx.spec                                     |    7 ++++-
 2 files changed, 43 insertions(+), 1 deletions(-)
---
diff --git a/mx-3.2.3-distutils_customize_compiler.patch b/mx-3.2.3-distutils_customize_compiler.patch
new file mode 100644
index 0000000..56f40c9
--- /dev/null
+++ b/mx-3.2.3-distutils_customize_compiler.patch
@@ -0,0 +1,37 @@
+Description: Go back to importing customize_compiler from distutils.sysconfig
+ This is needed with Python 2.7.3, and should still work with earlier 2.7
+ versions.
+Author: Colin Watson <cjwatson at ubuntu.com>
+Bug-Debian: http://bugs.debian.org/664939
+Forwarded: no
+Last-Update: 2012-04-02
+
+Index: b/mxSetup.py
+===================================================================
+--- a/mxSetup.py
++++ b/mxSetup.py
+@@ -297,11 +297,12 @@
+ from distutils.command.sdist import sdist
+ from distutils.command.clean import clean
+ import distutils.archive_util
++from distutils.sysconfig 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 +314,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.
diff --git a/mx.spec b/mx.spec
index 1e0a335..460302c 100644
--- a/mx.spec
+++ b/mx.spec
@@ -5,10 +5,11 @@
 Summary:  A collection of Python software tools
 Name: mx%{pybasever}
 Version: 3.2.3
-Release: 1%{?dist}
+Release: 2%{?dist}
 URL: http://www.egenix.com/products/python/mxBase/
 Source0: http://downloads.egenix.com/python/egenix-mx-base-%{version}.tar.gz
 Patch1: mx-3.1.1-lib64.patch
+Patch2: mx-3.2.3-distutils_customize_compiler.patch
 License: Python
 Group: Development/Libraries
 BuildRequires: Distutils
@@ -34,6 +35,7 @@ Development files for %{name}
 %prep
 %setup -q -n egenix-mx-base-%{version}
 %patch1 -p1 -b .lib64
+%patch2 -p1 -b .customize_compiler
 
 %build
 # alter /usr/local/bin/python
@@ -106,6 +108,9 @@ rm -rf %{buildroot}
 %{_includedir}/mx/
 
 %changelog
+* Tue Jul 03 2012 Dan Horák <dan[at]danny.cz> 3.2.3-2
+- fix FTBFS with python 2.7.3
+
 * Wed Mar 14 2012 Brian C. Lane <bcl at redhat.com> 3.2.3-1
 - Upstream v3.2.3
 


More information about the scm-commits mailing list