diff options
author | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2014-02-13 21:48:53 +0100 |
---|---|---|
committer | Peter Korsgaard <peter@korsgaard.com> | 2014-02-14 21:41:43 +0100 |
commit | 7e960dc9da56d4a484b5480746aaf617ca491274 (patch) | |
tree | 214a78615dbc3700847ca2be645ad75b5235d7ba /package/python/python-2.7-008-reread-environment.patch | |
parent | 577e52ac087a1a3c63837d0da37c93949c455941 (diff) | |
download | buildroot-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-008-reread-environment.patch')
-rw-r--r-- | package/python/python-2.7-008-reread-environment.patch | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/package/python/python-2.7-008-reread-environment.patch b/package/python/python-2.7-008-reread-environment.patch deleted file mode 100644 index 4ca22a4c9a..0000000000 --- a/package/python/python-2.7-008-reread-environment.patch +++ /dev/null @@ -1,65 +0,0 @@ -Make sure setup.py reads the correct CONFIG_ARGS - -The setup.py script that builds and installs all the Python modules -shipped with the interpreter looks at the CONFIG_ARGS variable stored -in the "sysconfig" module to look at the ./configure options and -adjust its behaviour accordingly. - -Unfortunately, when cross-compiling, the value of CONFIG_ARGS returned -by the sysconfig are the one passed to the ./configure script of the -*host* Python and not the one we're currently building for the target. - -In order to avoid that, we re-initialize the values in the sysconfig -module by re-reading the environment at the beginning of the setup.py -script, and we make sure that the CONFIG_ARGS variable is actually -part of the environment of setup.py. - -See the beginning of -http://article.gmane.org/gmane.comp.python.devel/99772 for the -inspiration. - -Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> - ---- - Makefile.pre.in | 6 +++--- - setup.py | 3 +++ - 2 files changed, 6 insertions(+), 3 deletions(-) - -Index: Python-2.7.2/Makefile.pre.in -=================================================================== ---- Python-2.7.2.orig/Makefile.pre.in -+++ Python-2.7.2/Makefile.pre.in -@@ -411,8 +411,8 @@ - # Build the shared modules - sharedmods: $(BUILDPYTHON) - @case $$MAKEFLAGS in \ -- *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' CROSS_COMPILING=@CROSS_COMPILING@ DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py -q build;; \ -- *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' CROSS_COMPILING=@CROSS_COMPILING@ DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py build;; \ -+ *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' CROSS_COMPILING=@CROSS_COMPILING@ DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" CONFIG_ARGS="$(CONFIG_ARGS)" $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py -q build;; \ -+ *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' CROSS_COMPILING=@CROSS_COMPILING@ DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" CONFIG_ARGS="$(CONFIG_ARGS)" $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py build;; \ - esac - - # Build static library -@@ -1044,7 +1044,7 @@ - # Install the dynamically loadable modules - # This goes into $(exec_prefix) - sharedinstall: sharedmods -- $(RUNSHARED) CROSS_COMPILING=@CROSS_COMPILING@ DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py install \ -+ $(RUNSHARED) CROSS_COMPILING=@CROSS_COMPILING@ DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" CONFIG_ARGS="$(CONFIG_ARGS)" $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py install \ - --prefix=$(prefix) \ - --install-scripts=$(BINDIR) \ - --install-platlib=$(DESTSHARED) \ -Index: Python-2.7.2/setup.py -=================================================================== ---- Python-2.7.2.orig/setup.py -+++ Python-2.7.2/setup.py -@@ -20,6 +20,9 @@ - # Were we compiled --with-pydebug or with #define Py_DEBUG? - COMPILED_WITH_PYDEBUG = hasattr(sys, 'gettotalrefcount') - -+sysconfig.get_config_vars() -+sysconfig._CONFIG_VARS.update(os.environ) -+ - # This global variable is used to hold the list of modules to be disabled. - try: - disabled_module_list = sysconfig.get_config_var("DISABLED_EXTENSIONS").split(" ") |