summaryrefslogtreecommitdiffstats
path: root/package/python/python-2.7-004-no-host-headers-libs.patch
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2014-02-13 21:48:53 +0100
committerPeter Korsgaard <peter@korsgaard.com>2014-02-14 21:41:43 +0100
commit7e960dc9da56d4a484b5480746aaf617ca491274 (patch)
tree214a78615dbc3700847ca2be645ad75b5235d7ba /package/python/python-2.7-004-no-host-headers-libs.patch
parent577e52ac087a1a3c63837d0da37c93949c455941 (diff)
downloadbuildroot-7e960dc9da56d4a484b5480746aaf617ca491274.tar.gz
buildroot-7e960dc9da56d4a484b5480746aaf617ca491274.zip
python: bump to 2.7.6
Even though jumping from 2.7.3 to 2.7.6 looks like a minor version bump, it is in fact a fairly significant one, because a good number of changes to help cross-compilation have been merged into Python upstream. Therefore, most of our patches are affected by this change. In detail, this commit: * Renames all the patches to follow the naming convention of patches in Buildroot: the patch file names should not have any version number. * The patches numbered above 100, that add configuration options to disable certain modules of the Python standard library, are only renamed and slightly adapted, they didn't change that much. * The patches numbered below 100 are almost entirely rewritten: many of the cross-compilation problems that used to exist in Python 2.7.3 no longer exist, and the number of remaining problems is smaller, and can be fixed with smaller patches. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'package/python/python-2.7-004-no-host-headers-libs.patch')
-rw-r--r--package/python/python-2.7-004-no-host-headers-libs.patch111
1 files changed, 0 insertions, 111 deletions
diff --git a/package/python/python-2.7-004-no-host-headers-libs.patch b/package/python/python-2.7-004-no-host-headers-libs.patch
deleted file mode 100644
index c0c528aceb..0000000000
--- a/package/python/python-2.7-004-no-host-headers-libs.patch
+++ /dev/null
@@ -1,111 +0,0 @@
-Do not look at host headers/libraries in cross-compile mode
-
-When we are cross-compiling, setup.py should never look in /usr or
-/usr/local to find headers or libraries. A later patch adds a
-mechanism to tell setup.py to look in a specific directory for headers
-and libraries.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
----
- setup.py | 39 +++++++++++++++++++++------------------
- 1 file changed, 21 insertions(+), 18 deletions(-)
-
-Index: Python-2.7.2/setup.py
-===================================================================
---- Python-2.7.2.orig/setup.py
-+++ Python-2.7.2/setup.py
-@@ -373,9 +373,10 @@
-
- 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()
-+ if os.environ.get('CROSS_COMPILING') != 'yes':
-+ 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.
-@@ -383,10 +384,7 @@
- # directly since an inconsistently reproducible issue comes up where
- # the environment variable is not set even though the value were passed
- # into configure and stored in the Makefile (issue found on OS X 10.3).
-- for env_var, arg_name, dir_list in (
-- ('LDFLAGS', '-R', self.compiler.runtime_library_dirs),
-- ('LDFLAGS', '-L', self.compiler.library_dirs),
-- ('CPPFLAGS', '-I', self.compiler.include_dirs)):
-+ for env_var, arg_name, dir_list in ():
- env_val = sysconfig.get_config_var(env_var)
- if env_val:
- # To prevent optparse from raising an exception about any
-@@ -411,17 +409,6 @@
- for directory in reversed(options.dirs):
- add_dir_to_list(dir_list, directory)
-
-- if os.path.normpath(sys.prefix) != '/usr' \
-- and not sysconfig.get_config_var('PYTHONFRAMEWORK'):
-- # OSX note: Don't add LIBDIR and INCLUDEDIR to building a framework
-- # (PYTHONFRAMEWORK is set) to avoid # linking problems when
-- # building a framework with different architectures than
-- # the one that is currently installed (issue #7473)
-- add_dir_to_list(self.compiler.library_dirs,
-- sysconfig.get_config_var("LIBDIR"))
-- add_dir_to_list(self.compiler.include_dirs,
-- sysconfig.get_config_var("INCLUDEDIR"))
--
- try:
- have_unicode = unicode
- except NameError:
-@@ -430,11 +417,16 @@
- # lib_dirs and inc_dirs are used to search for files;
- # if a file is found in one of those directories, it can
- # be assumed that no additional -I,-L directives are needed.
-- lib_dirs = self.compiler.library_dirs + [
-- '/lib64', '/usr/lib64',
-- '/lib', '/usr/lib',
-- ]
-- inc_dirs = self.compiler.include_dirs + ['/usr/include']
-+ lib_dirs = self.compiler.library_dirs
-+ inc_dirs = self.compiler.include_dirs
-+
-+ if os.environ.get('CROSS_COMPILING') != 'yes':
-+ lib_dirs += [
-+ '/lib64', '/usr/lib64',
-+ '/lib', '/usr/lib',
-+ ]
-+ inc_dirs += ['/usr/include']
-+
- exts = []
- missing = []
-
-@@ -867,6 +859,9 @@
- db_inc_paths.append('/pkg/db-3.%d/include' % x)
- db_inc_paths.append('/opt/db-3.%d/include' % x)
-
-+ if os.environ.get('CROSS_COMPILING') == 'yes':
-+ db_inc_paths = []
-+
- # Add some common subdirectories for Sleepycat DB to the list,
- # based on the standard include directories. This way DB3/4 gets
- # picked up when it is installed in a non-standard prefix and
-@@ -1019,6 +1014,9 @@
- MIN_SQLITE_VERSION = ".".join([str(x)
- for x in MIN_SQLITE_VERSION_NUMBER])
-
-+ if os.environ.get('CROSS_COMPILING') == 'yes':
-+ sqlite_inc_paths = []
-+
- # Scan the default include directories before the SQLite specific
- # ones. This allows one to override the copy of sqlite on OSX,
- # where /usr/include contains an old version of sqlite.
-@@ -1118,6 +1116,8 @@
- # the more recent berkeleydb's db.h file first in the include path
- # when attempting to compile and it will fail.
- f = "/usr/include/db.h"
-+ if os.environ.get('CROSS_COMPILING') == 'yes':
-+ f = ''
-
- if sys.platform == 'darwin':
- if is_macosx_sdk_path(f):
OpenPOWER on IntegriCloud