diff --git a/python-2.7.2-add-extension-suffix-to-python-config.patch b/python-2.7.2-add-extension-suffix-to-python-config.patch new file mode 100644 index 0000000..4d56867 --- /dev/null +++ b/python-2.7.2-add-extension-suffix-to-python-config.patch @@ -0,0 +1,18 @@ +diff -up Python-2.7.2/Misc/python-config.in.add-extension-suffix-to-python-config Python-2.7.2/Misc/python-config.in +--- Python-2.7.2/Misc/python-config.in.add-extension-suffix-to-python-config 2011-08-23 18:15:41.832497124 -0400 ++++ Python-2.7.2/Misc/python-config.in 2011-08-23 18:17:25.854490011 -0400 +@@ -6,7 +6,7 @@ import getopt + from distutils import sysconfig + + valid_opts = ['prefix', 'exec-prefix', 'includes', 'libs', 'cflags', +- 'ldflags', 'help'] ++ 'ldflags', 'extension-suffix', 'help'] + + def exit_with_usage(code=1): + print >>sys.stderr, "Usage: %s [%s]" % (sys.argv[0], +@@ -54,3 +54,5 @@ for opt in opt_flags: + libs.extend(getvar('LINKFORSHARED').split()) + print ' '.join(libs) + ++ elif opt == '--extension-suffix': ++ print (sys.pydebug and "_d" or "") + sysconfig.get_config_var('SO') diff --git a/python.spec b/python.spec index 7f2951b..ff0113d 100644 --- a/python.spec +++ b/python.spec @@ -102,7 +102,7 @@ Summary: An interpreted, interactive, object-oriented programming language Name: %{python} # Remember to also rebase python-docs when changing this: Version: 2.7.2 -Release: 7%{?dist} +Release: 8%{?dist} License: Python Group: Development/Languages Requires: %{python}-libs%{?_isa} = %{version}-%{release} @@ -420,7 +420,9 @@ Patch111: python-2.7rc1-no-static-lib.patch # * Similarly, we add DEBUG_SUFFIX within python-config and # python$(VERSION)-config, so that the two configuration get different paths # for these. - +# +# See also patch 130 below +# Patch112: python-2.7rc1-debug-build.patch @@ -480,6 +482,22 @@ Patch128: python-2.7.1-fix_test_abc_with_COUNT_ALLOCS.patch # Not yet sent upstream Patch129: python-2.7.2-tsc-on-ppc.patch +# Add "--extension-suffix" option to python-config and python-debug-config +# (rhbz#732808) +# +# This is adapted from 3.2's PEP-3149 support. +# +# Fedora's debug build has some non-standard features (see also patch 112 +# above), though largely shared with Debian/Ubuntu and Windows +# +# In particular, SO in the Makefile is currently always just ".so" for our +# python 2 optimized builds, but for python 2 debug it should be '_d.so', to +# distinguish the debug vs optimized ABI, following the pattern in the above +# patch. +# +# Not yet sent upstream +Patch130: python-2.7.2-add-extension-suffix-to-python-config.patch + # This is the generated patch to "configure"; see the description of # %{regenerate_autotooling_patch} # above: @@ -721,6 +739,7 @@ rm -r Modules/zlib || exit 1 %patch127 -p0 -b .fix-test_structmember-on-64bit-bigendian %patch128 -p1 %patch129 -p1 -b .tsc-on-ppc +%patch130 -p1 # This shouldn't be necesarry, but is right now (2.2a3) find -name "*~" |xargs rm -f @@ -1777,6 +1796,9 @@ rm -fr %{buildroot} # ====================================================== %changelog +* Tue Aug 23 2011 David Malcolm - 2.7.2-8 +- add --extension-suffix option to python-config (patch 130; rhbz#732808) + * Tue Aug 23 2011 David Malcolm - 2.7.2-7 - re-enable and fix the --with-tsc option on ppc64, and rework it on 32-bit ppc to avoid aliasing violations (patch 129; rhbz#698726)