summarylogtreecommitdiffstats
path: root/python-2.6-distutils.patch
diff options
context:
space:
mode:
authorChristopher Arndt2015-06-21 01:38:46 +0200
committerChristopher Arndt2015-06-21 01:38:46 +0200
commit7cb924d51eb667dcc750ce1c491fa9aa1a411077 (patch)
tree9800ef914697eda2bb83682076096e4a0e85b6ce /python-2.6-distutils.patch
downloadaur-7cb924d51eb667dcc750ce1c491fa9aa1a411077.tar.gz
Initial import of python26 package
Diffstat (limited to 'python-2.6-distutils.patch')
-rw-r--r--python-2.6-distutils.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/python-2.6-distutils.patch b/python-2.6-distutils.patch
new file mode 100644
index 000000000000..410c4095f569
--- /dev/null
+++ b/python-2.6-distutils.patch
@@ -0,0 +1,43 @@
+diff -uNr Python-2.6.9.orig/Lib/distutils/tests/test_build_ext.py Python-2.6.9/Lib/distutils/tests/test_build_ext.py
+--- Python-2.6.9.orig/Lib/distutils/tests/test_build_ext.py 2013-10-29 16:04:37.000000000 +0100
++++ Python-2.6.9/Lib/distutils/tests/test_build_ext.py 2014-06-20 17:14:14.700080398 +0200
+@@ -35,6 +35,24 @@
+ sys.path.append(self.tmp_dir)
+ shutil.copy(_get_source_filename(), self.tmp_dir)
+
++ def _fixup_command(self, cmd):
++ # When Python was build with --enable-shared, -L. is not good enough
++ # to find the libpython<blah>.so. This is because regrtest runs it
++ # under a tempdir, not in the top level where the .so lives. By the
++ # time we've gotten here, Python's already been chdir'd to the
++ # tempdir.
++ #
++ # To further add to the fun, we can't just add library_dirs to the
++ # Extension() instance because that doesn't get plumbed through to the
++ # final compiler command.
++ if not sys.platform.startswith('win'):
++ runshared = sysconfig.get_config_var('RUNSHARED')
++ if runshared is None:
++ cmd.library_dirs = ['.']
++ else:
++ name, equals, value = runshared.partition('=')
++ cmd.library_dirs = value.split(os.pathsep)
++
+ def test_build_ext(self):
+ global ALREADY_TESTED
+ xx_c = os.path.join(self.tmp_dir, 'xxmodule.c')
+@@ -42,6 +60,7 @@
+ dist = Distribution({'name': 'xx', 'ext_modules': [xx_ext]})
+ dist.package_dir = self.tmp_dir
+ cmd = build_ext(dist)
++ self._fixup_command(cmd)
+ if os.name == "nt":
+ # On Windows, we must build a debug version iff running
+ # a debug build of Python
+@@ -242,6 +261,7 @@
+ dist = Distribution({'name': 'xx',
+ 'ext_modules': [ext]})
+ cmd = build_ext(dist)
++ self._fixup_command(cmd)
+ cmd.ensure_finalized()
+ self.assertEquals(len(cmd.get_outputs()), 1)