From ccc51244e375c580651e89347988770de1ebbfb9 Mon Sep 17 00:00:00 2001 From: Yamashita Yuu Date: Fri, 1 Nov 2013 17:13:29 +0900 Subject: [PATCH] Add CPython 2.6.9 --- plugins/python-build/share/python-build/2.6.9 | 5 ++ .../Python-2.6.9/000_patch-setup.py.diff | 47 +++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 plugins/python-build/share/python-build/2.6.9 create mode 100644 plugins/python-build/share/python-build/patches/2.6.9/Python-2.6.9/000_patch-setup.py.diff diff --git a/plugins/python-build/share/python-build/2.6.9 b/plugins/python-build/share/python-build/2.6.9 new file mode 100644 index 00000000..61951d7e --- /dev/null +++ b/plugins/python-build/share/python-build/2.6.9 @@ -0,0 +1,5 @@ +require_gcc +install_package "readline-6.2" "http://ftpmirror.gnu.org/readline/readline-6.2.tar.gz#67948acb2ca081f23359d0256e9a271c" standard --if has_broken_mac_readline +install_package "Python-2.6.9" "http://www.python.org/ftp/python/2.6.9/Python-2.6.9.tgz#bddbd64bf6f5344fc55bbe49a72fe4f3" standard verify_py26 +install_package "setuptools-1.1.7" "https://pypi.python.org/packages/source/s/setuptools/setuptools-1.1.7.tar.gz#1f33594d25d574a1640ffb84667c6759" python +install_package "pip-1.4.1" "https://pypi.python.org/packages/source/p/pip/pip-1.4.1.tar.gz#6afbb46aeb48abac658d4df742bff714" python diff --git a/plugins/python-build/share/python-build/patches/2.6.9/Python-2.6.9/000_patch-setup.py.diff b/plugins/python-build/share/python-build/patches/2.6.9/Python-2.6.9/000_patch-setup.py.diff new file mode 100644 index 00000000..b2998bca --- /dev/null +++ b/plugins/python-build/share/python-build/patches/2.6.9/Python-2.6.9/000_patch-setup.py.diff @@ -0,0 +1,47 @@ + +# HG changeset patch +# User Barry Warsaw +# Date 1302190091 14400 +# Node ID bd0f73a9538e05f526feaf05821e68bdcff498fa +# Parent 2e4cdaffe493e879fb5367a4aa454491de451137 +Backport for Python 2.7 of issue 11715 support for building Python on +multiarch Debian/Ubuntu. + +diff --git a/setup.py b/setup.py +--- setup.py.orig ++++ setup.py +@@ -345,10 +345,33 @@ class PyBuildExt(build_ext): + return platform + return sys.platform + ++ def add_multiarch_paths(self): ++ # Debian/Ubuntu multiarch support. ++ # https://wiki.ubuntu.com/MultiarchSpec ++ if not find_executable('dpkg-architecture'): ++ return ++ tmpfile = os.path.join(self.build_temp, 'multiarch') ++ if not os.path.exists(self.build_temp): ++ os.makedirs(self.build_temp) ++ ret = os.system( ++ 'dpkg-architecture -qDEB_HOST_MULTIARCH > %s 2> /dev/null' % ++ tmpfile) ++ try: ++ if ret >> 8 == 0: ++ with open(tmpfile) as fp: ++ multiarch_path_component = fp.readline().strip() ++ add_dir_to_list(self.compiler.library_dirs, ++ '/usr/lib/' + multiarch_path_component) ++ add_dir_to_list(self.compiler.include_dirs, ++ '/usr/include/' + multiarch_path_component) ++ finally: ++ os.unlink(tmpfile) ++ + def detect_modules(self): + # Ensure that /usr/local is always used + add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') + add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') ++ self.add_multiarch_paths() + + # Add paths specified in the environment variables LDFLAGS and + # CPPFLAGS for header and library files. +