* [Buildroot] [PATCHv1 00/26] Python 2 and 3 bumps, support for Python 3 external modules
@ 2014-02-13 20:48 Thomas Petazzoni
2014-02-13 20:48 ` [Buildroot] [PATCHv1 01/26] python: expose PYTHON_PATH Thomas Petazzoni
` (26 more replies)
0 siblings, 27 replies; 36+ messages in thread
From: Thomas Petazzoni @ 2014-02-13 20:48 UTC (permalink / raw)
To: buildroot
Hello,
This patch series contains a significant number of improvements to the
Python packaging in Buildroot:
* Both the Python 2.x and 3.x interpreters are bumped to their latest
versions. For Python 3.x, we have chosen to work with Python
3.4.0rc1 in order to be ready when Python 3.4.0 is released
mid-March (in fact I started working initially with 3.4.0b1, and
updated progressively).
* Add support for building external Python modules with Python
3.x. This was made possible thanks to the addition of the Python
package infrastructure in the last Buildroot release.
Quick summary of the patches:
* Patches 1 to 5 make various preparations and cleanups around Python
2.x handling, and bump Python 2.7.3 to 2.7.6.
* Patches 6 to 8 make additional small improvements to the Python
package infrastructure.
* Patches 9 to 14 prepare and implement the bump of Python 3.x to
3.4.0rc1.
* Patches 15 to 17 allow Python external modules to be built with
Python 3.x.
* Patches 18 to 19 are other small improvements, and bumps.
* Patches 21 to 26 allow a number of existing Python external modules
to build with Python 3.
It is worth noting that:
* I have tried to push a few patches that I needed to the upstream
Python (since by working on 3.4.0 beta versions I was very close to
upstream), but I never had any feedback so far.
* In total, this patch set removes approximately 1000 lines of code
in Buildroot, while providing more features. Which is nice, I
believe :-)
I really encourage people to test these patches, so I have pushed this
work at the following location:
http://git.free-electrons.com/users/thomas-petazzoni/buildroot/log/?h=python3-pkg
Thanks!
Thomas
Przemyslaw Wrzos (1):
python, python3: fix to ensure libpython is stripped
Rohan Fletcher (1):
python-setuptools: bump version to 2.1.2
Thomas Petazzoni (23):
python: expose PYTHON_PATH
pkg-python: use the newly defined PYTHON_PATH variable
pkg-python: also pass PYTHONPATH when building distutils packages
python: bump to 2.7.6
pkg-python: simplifications after the Python 2.x bump
core: remove .py/.pyc for Python
pkg-python: no longer use distutilscross for setuptools
python-distutilscross: remove package that is no longer needed
python3: removal of *.py/*.pyc is now done globally
python3: make it exclusive from python
python3: add python -> python3 symlink for the host variant
python3: use proper PYTHON3_VERSION_MAJOR instead of harcoding 3.3
python3: bump to 3.4.0rc1
python3: provide a PYTHON3_PATH
package: add python3 support in the package infrastructure
package: allow Python packages with Python3
python, python3: enable unicodedata for host-python, needed by
setuptools
python-pyasn: use the real upstream
python-bottle: allow to build with Python 3
python-serial: allow to build with Python 3
python-pyasn: allow to build with Python 3
python-pycrypto: allow to build with Python 3
python-pysnmp{,-apps,-mibs}: allow to build with Python 3
kpa_info at yahoo.fr (1):
python3: add config directory symbolic link
Makefile | 4 +-
package/Config.in | 4 +-
package/pkg-python.mk | 34 ++---
package/python-bottle/Config.in | 2 +-
.../python-distutilscross/python-distutilscross.mk | 12 --
package/python-pyasn/Config.in | 2 +-
package/python-pyasn/python-pyasn.mk | 12 +-
package/python-pycrypto/Config.in | 2 +-
package/python-pysnmp-apps/Config.in | 2 +-
package/python-pysnmp-mibs/Config.in | 2 +-
package/python-pysnmp/Config.in | 2 +-
package/python-serial/Config.in | 2 +-
package/python-setuptools/python-setuptools.mk | 11 +-
.../python-001-remove-host-header-path.patch | 32 +++++
package/python/python-002-fix-get-python-inc.patch | 36 +++++
...ython-003-properly-detect-if-python-build.patch | 23 +++
...python-004-sysconfigdata-install-location.patch | 76 ++++++++++
.../python/python-005-pyc-pyo-conditional.patch | 59 ++++++++
.../python-006-cross-compile-getaddrinfo.patch | 13 ++
package/python/python-007-disable-extensions.patch | 60 ++++++++
.../python-008-distutils-use-python-sysroot.patch | 54 +++++++
.../python/python-009-no-termcap-host-path.patch | 23 +++
...atch => python-100-optional-test-modules.patch} | 48 ++++---
...pydoc.patch => python-101-optional-pydoc.patch} | 36 ++---
...l-2to3.patch => python-102-optional-2to3.patch} | 51 ++++---
...lite.patch => python-103-optional-sqlite.patch} | 49 ++++---
...ional-tk.patch => python-104-optional-tk.patch} | 46 +++---
...rses.patch => python-105-optional-curses.patch} | 24 ++--
...expat.patch => python-106-optional-expat.patch} | 30 ++--
....patch => python-107-optional-codecs-cjk.patch} | 8 +-
...nal-nis.patch => python-108-optional-nis.patch} | 8 +-
...patch => python-109-optional-unicodedata.patch} | 8 +-
...ional-db.patch => python-110-optional-db.patch} | 41 +++---
...nal-ssl.patch => python-111-optional-ssl.patch} | 8 +-
...bzip2.patch => python-112-optional-bzip2.patch} | 8 +-
...l-zlib.patch => python-113-optional-zlib.patch} | 8 +-
.../python/python-2.7-001-support-for-build.patch | 154 --------------------
.../python-2.7-002-cross-compile-variable.patch | 55 -------
...on-2.7-003-no-import-when-cross-compiling.patch | 26 ----
.../python-2.7-004-no-host-headers-libs.patch | 111 ---------------
.../python-2.7-005-staging-headers-libs.patch | 38 -----
.../python/python-2.7-006-disable-extensions.patch | 102 -------------
.../python-2.7-007-do-not-generate-pyo-files.patch | 40 ------
.../python/python-2.7-008-reread-environment.patch | 65 ---------
...python-2.7-010-change-pyconfig-h-location.patch | 76 ----------
package/python/python-2.7-011-no-rpath.patch | 75 ----------
.../python-2.7-012-correct-32bit-64bit-check.patch | 55 -------
.../python-2.7-013-fix-linux-3-compilation.patch | 24 ----
.../python-2.7-014-verbose-module-build.patch | 19 ---
...7-015-distutils-cross-compilation-support.patch | 125 ----------------
.../python-2.7-016-cross-compile-getaddrinfo.patch | 15 --
package/python/python.mk | 61 ++++----
package/python3/Config.in | 1 +
...ython3-000-generate-sysconfigdata-buildir.patch | 158 ---------------------
.../python3-001-remove-host-header-path.patch | 36 +++++
.../python3/python3-001-support-for-build.patch | 68 ---------
.../python3/python3-002-no-host-headers-libs.patch | 72 ----------
...thon3-002-properly-detect-if-python-build.patch | 23 +++
.../python3/python3-003-staging-header-libs.patch | 41 ------
...ython3-003-sysconfigdata-install-location.patch | 76 ++++++++++
...ython3-004-no-import-when-cross-compiling.patch | 27 ----
...he.patch => python3-004-old-stdlib-cache.patch} | 39 +++--
.../python3-005-do-not-generate-pyo-files.patch | 40 ------
.../python3/python3-005-pyc-pyo-conditional.patch | 60 ++++++++
...=> python3-006-cross-compile-getaddrinfo.patch} | 8 +-
.../python3/python3-006-reread-environment.patch | 63 --------
.../python3-007-change-pyconfig-h-location.patch | 76 ----------
....patch => python3-007-disable-extensions.patch} | 44 +++---
...008-distutils-sysconfig-use-sysconfigdata.patch | 58 ++++++++
package/python3/python3-008-no-rpath.patch | 51 -------
.../python3-009-distutils-use-python-sysroot.patch | 57 ++++++++
.../python3/python3-009-verbose-module-build.patch | 26 ----
...3-010-distutils-cross-compilation-support.patch | 71 ---------
.../python3/python3-010-no-termcap-host-path.patch | 22 +++
.../python3-100-optional-test-modules.patch | 60 ++++----
package/python3/python3-101-optional-pydoc.patch | 46 +++---
package/python3/python3-102-optional-2to3.patch | 68 +++++----
package/python3/python3-103-optional-sqlite.patch | 53 ++++---
package/python3/python3-104-optional-tk.patch | 51 ++++---
package/python3/python3-105-optional-curses.patch | 30 ++--
package/python3/python3-106-optional-expat.patch | 36 ++---
.../python3/python3-107-optional-codecs-cjk.patch | 8 +-
package/python3/python3-108-optional-nis.patch | 8 +-
.../python3/python3-109-optional-unicodedata.patch | 8 +-
package/python3/python3-110-optional-idle.patch | 39 +++--
package/python3/python3.mk | 102 ++++++-------
86 files changed, 1265 insertions(+), 2242 deletions(-)
delete mode 100644 package/python-distutilscross/python-distutilscross.mk
create mode 100644 package/python/python-001-remove-host-header-path.patch
create mode 100644 package/python/python-002-fix-get-python-inc.patch
create mode 100644 package/python/python-003-properly-detect-if-python-build.patch
create mode 100644 package/python/python-004-sysconfigdata-install-location.patch
create mode 100644 package/python/python-005-pyc-pyo-conditional.patch
create mode 100644 package/python/python-006-cross-compile-getaddrinfo.patch
create mode 100644 package/python/python-007-disable-extensions.patch
create mode 100644 package/python/python-008-distutils-use-python-sysroot.patch
create mode 100644 package/python/python-009-no-termcap-host-path.patch
rename package/python/{python-2.7-100-optional-test-modules.patch => python-100-optional-test-modules.patch} (71%)
rename package/python/{python-2.7-101-optional-pydoc.patch => python-101-optional-pydoc.patch} (77%)
rename package/python/{python-2.7-102-optional-2to3.patch => python-102-optional-2to3.patch} (70%)
rename package/python/{python-2.7-103-optional-sqlite.patch => python-103-optional-sqlite.patch} (57%)
rename package/python/{python-2.7-104-optional-tk.patch => python-104-optional-tk.patch} (59%)
rename package/python/{python-2.7-105-optional-curses.patch => python-105-optional-curses.patch} (75%)
rename package/python/{python-2.7-106-optional-expat.patch => python-106-optional-expat.patch} (84%)
rename package/python/{python-2.7-107-optional-codecs-cjk.patch => python-107-optional-codecs-cjk.patch} (84%)
rename package/python/{python-2.7-108-optional-nis.patch => python-108-optional-nis.patch} (85%)
rename package/python/{python-2.7-109-optional-unicodedata.patch => python-109-optional-unicodedata.patch} (83%)
rename package/python/{python-2.7-110-optional-db.patch => python-110-optional-db.patch} (75%)
rename package/python/{python-2.7-111-optional-ssl.patch => python-111-optional-ssl.patch} (83%)
rename package/python/{python-2.7-112-optional-bzip2.patch => python-112-optional-bzip2.patch} (83%)
rename package/python/{python-2.7-113-optional-zlib.patch => python-113-optional-zlib.patch} (84%)
delete mode 100644 package/python/python-2.7-001-support-for-build.patch
delete mode 100644 package/python/python-2.7-002-cross-compile-variable.patch
delete mode 100644 package/python/python-2.7-003-no-import-when-cross-compiling.patch
delete mode 100644 package/python/python-2.7-004-no-host-headers-libs.patch
delete mode 100644 package/python/python-2.7-005-staging-headers-libs.patch
delete mode 100644 package/python/python-2.7-006-disable-extensions.patch
delete mode 100644 package/python/python-2.7-007-do-not-generate-pyo-files.patch
delete mode 100644 package/python/python-2.7-008-reread-environment.patch
delete mode 100644 package/python/python-2.7-010-change-pyconfig-h-location.patch
delete mode 100644 package/python/python-2.7-011-no-rpath.patch
delete mode 100644 package/python/python-2.7-012-correct-32bit-64bit-check.patch
delete mode 100644 package/python/python-2.7-013-fix-linux-3-compilation.patch
delete mode 100644 package/python/python-2.7-014-verbose-module-build.patch
delete mode 100644 package/python/python-2.7-015-distutils-cross-compilation-support.patch
delete mode 100644 package/python/python-2.7-016-cross-compile-getaddrinfo.patch
delete mode 100644 package/python3/python3-000-generate-sysconfigdata-buildir.patch
create mode 100644 package/python3/python3-001-remove-host-header-path.patch
delete mode 100644 package/python3/python3-001-support-for-build.patch
delete mode 100644 package/python3/python3-002-no-host-headers-libs.patch
create mode 100644 package/python3/python3-002-properly-detect-if-python-build.patch
delete mode 100644 package/python3/python3-003-staging-header-libs.patch
create mode 100644 package/python3/python3-003-sysconfigdata-install-location.patch
delete mode 100644 package/python3/python3-004-no-import-when-cross-compiling.patch
rename package/python3/{python3-112-old-stdlib-cache.patch => python3-004-old-stdlib-cache.patch} (61%)
delete mode 100644 package/python3/python3-005-do-not-generate-pyo-files.patch
create mode 100644 package/python3/python3-005-pyc-pyo-conditional.patch
rename package/python3/{python3-011-cross-compile-getaddrinfo.patch => python3-006-cross-compile-getaddrinfo.patch} (81%)
delete mode 100644 package/python3/python3-006-reread-environment.patch
delete mode 100644 package/python3/python3-007-change-pyconfig-h-location.patch
rename package/python3/{python3-012-disable-extensions.patch => python3-007-disable-extensions.patch} (78%)
create mode 100644 package/python3/python3-008-distutils-sysconfig-use-sysconfigdata.patch
delete mode 100644 package/python3/python3-008-no-rpath.patch
create mode 100644 package/python3/python3-009-distutils-use-python-sysroot.patch
delete mode 100644 package/python3/python3-009-verbose-module-build.patch
delete mode 100644 package/python3/python3-010-distutils-cross-compilation-support.patch
create mode 100644 package/python3/python3-010-no-termcap-host-path.patch
--
1.8.3.2
^ permalink raw reply [flat|nested] 36+ messages in thread
* [Buildroot] [PATCHv1 01/26] python: expose PYTHON_PATH
2014-02-13 20:48 [Buildroot] [PATCHv1 00/26] Python 2 and 3 bumps, support for Python 3 external modules Thomas Petazzoni
@ 2014-02-13 20:48 ` Thomas Petazzoni
2014-02-14 20:52 ` Peter Korsgaard
2014-02-13 20:48 ` [Buildroot] [PATCHv1 02/26] pkg-python: use the newly defined PYTHON_PATH variable Thomas Petazzoni
` (25 subsequent siblings)
26 siblings, 1 reply; 36+ messages in thread
From: Thomas Petazzoni @ 2014-02-13 20:48 UTC (permalink / raw)
To: buildroot
As a preparation to make the Python infrastructure support both Python
and Python 3, as well as the bump of Python 2 and 3, we need the
Python package to expose the Python module path in a variable called
PYTHON_PATH. It will be used by the following commits.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/python/python.mk | 3 +++
1 file changed, 3 insertions(+)
diff --git a/package/python/python.mk b/package/python/python.mk
index 6187d66..f2e48c4 100644
--- a/package/python/python.mk
+++ b/package/python/python.mk
@@ -167,5 +167,8 @@ PYTHON_POST_INSTALL_TARGET_HOOKS += PYTHON_REMOVE_USELESS_FILES
PYTHON_AUTORECONF = YES
+# Provided to other packages
+PYTHON_PATH = $(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages/
+
$(eval $(autotools-package))
$(eval $(host-autotools-package))
--
1.8.3.2
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [Buildroot] [PATCHv1 02/26] pkg-python: use the newly defined PYTHON_PATH variable
2014-02-13 20:48 [Buildroot] [PATCHv1 00/26] Python 2 and 3 bumps, support for Python 3 external modules Thomas Petazzoni
2014-02-13 20:48 ` [Buildroot] [PATCHv1 01/26] python: expose PYTHON_PATH Thomas Petazzoni
@ 2014-02-13 20:48 ` Thomas Petazzoni
2014-02-14 20:55 ` Peter Korsgaard
2014-02-13 20:48 ` [Buildroot] [PATCHv1 03/26] pkg-python: also pass PYTHONPATH when building distutils packages Thomas Petazzoni
` (24 subsequent siblings)
26 siblings, 1 reply; 36+ messages in thread
From: Thomas Petazzoni @ 2014-02-13 20:48 UTC (permalink / raw)
To: buildroot
Now that the Python package exposes its PYTHON_PATH variable, we can
use it in the package infrastructure. This prepares both the upcoming
bump of Python 2.x, and the introduction of Python 3 support in the
Python package infrastructure.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/pkg-python.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/pkg-python.mk b/package/pkg-python.mk
index 9b3c97a..2153534 100644
--- a/package/pkg-python.mk
+++ b/package/pkg-python.mk
@@ -48,7 +48,7 @@ HOST_PKG_PYTHON_DISTUTILS_INSTALL_OPT = \
# Target setuptools-based packages
PKG_PYTHON_SETUPTOOLS_ENV = \
PATH="$(TARGET_PATH)" \
- PYTHONPATH="$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages" \
+ PYTHONPATH="$(PYTHON_PATH)" \
PYTHONXCPREFIX="$(STAGING_DIR)/usr/" \
CROSS_COMPILING=yes \
_python_sysroot=$(STAGING_DIR) \
--
1.8.3.2
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [Buildroot] [PATCHv1 03/26] pkg-python: also pass PYTHONPATH when building distutils packages
2014-02-13 20:48 [Buildroot] [PATCHv1 00/26] Python 2 and 3 bumps, support for Python 3 external modules Thomas Petazzoni
2014-02-13 20:48 ` [Buildroot] [PATCHv1 01/26] python: expose PYTHON_PATH Thomas Petazzoni
2014-02-13 20:48 ` [Buildroot] [PATCHv1 02/26] pkg-python: use the newly defined PYTHON_PATH variable Thomas Petazzoni
@ 2014-02-13 20:48 ` Thomas Petazzoni
2014-02-14 20:58 ` Peter Korsgaard
2014-02-13 20:48 ` [Buildroot] [PATCHv1 04/26] python: bump to 2.7.6 Thomas Petazzoni
` (23 subsequent siblings)
26 siblings, 1 reply; 36+ messages in thread
From: Thomas Petazzoni @ 2014-02-13 20:48 UTC (permalink / raw)
To: buildroot
With the upcoming bump of Python 2.x, it will become important that
the PYTHONPATH is passed whenever we build third-party packages, be
they using the distutils build mechanism, or the setuptools build
mechanism. This is because passing PYTHONPATH is what will allow
Python to find a special Python module that contains all the
compiler/library/headers definitions that are relevant when
cross-compiling.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/pkg-python.mk | 1 +
1 file changed, 1 insertion(+)
diff --git a/package/pkg-python.mk b/package/pkg-python.mk
index 2153534..b4de56d 100644
--- a/package/pkg-python.mk
+++ b/package/pkg-python.mk
@@ -28,6 +28,7 @@ PKG_PYTHON_DISTUTILS_ENV = \
LDFLAGS="$(TARGET_LDFLAGS)" \
LDSHARED="$(TARGET_CROSS)gcc -shared" \
CROSS_COMPILING=yes \
+ PYTHONPATH="$(PYTHON_PATH)" \
_python_sysroot=$(STAGING_DIR) \
_python_prefix=/usr \
_python_exec_prefix=/usr
--
1.8.3.2
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [Buildroot] [PATCHv1 04/26] python: bump to 2.7.6
2014-02-13 20:48 [Buildroot] [PATCHv1 00/26] Python 2 and 3 bumps, support for Python 3 external modules Thomas Petazzoni
` (2 preceding siblings ...)
2014-02-13 20:48 ` [Buildroot] [PATCHv1 03/26] pkg-python: also pass PYTHONPATH when building distutils packages Thomas Petazzoni
@ 2014-02-13 20:48 ` Thomas Petazzoni
2014-02-14 20:59 ` Peter Korsgaard
2014-02-13 20:48 ` [Buildroot] [PATCHv1 05/26] pkg-python: simplifications after the Python 2.x bump Thomas Petazzoni
` (22 subsequent siblings)
26 siblings, 1 reply; 36+ messages in thread
From: Thomas Petazzoni @ 2014-02-13 20:48 UTC (permalink / raw)
To: buildroot
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>
---
| 32 +++++
package/python/python-002-fix-get-python-inc.patch | 36 +++++
...ython-003-properly-detect-if-python-build.patch | 23 +++
...python-004-sysconfigdata-install-location.patch | 76 ++++++++++
.../python/python-005-pyc-pyo-conditional.patch | 59 ++++++++
.../python-006-cross-compile-getaddrinfo.patch | 13 ++
package/python/python-007-disable-extensions.patch | 60 ++++++++
.../python-008-distutils-use-python-sysroot.patch | 54 ++++++++
.../python/python-009-no-termcap-host-path.patch | 23 +++
...atch => python-100-optional-test-modules.patch} | 48 ++++---
...pydoc.patch => python-101-optional-pydoc.patch} | 36 ++---
...l-2to3.patch => python-102-optional-2to3.patch} | 51 ++++---
...lite.patch => python-103-optional-sqlite.patch} | 49 ++++---
...ional-tk.patch => python-104-optional-tk.patch} | 46 +++---
...rses.patch => python-105-optional-curses.patch} | 24 ++--
...expat.patch => python-106-optional-expat.patch} | 30 ++--
....patch => python-107-optional-codecs-cjk.patch} | 8 +-
...nal-nis.patch => python-108-optional-nis.patch} | 8 +-
...patch => python-109-optional-unicodedata.patch} | 8 +-
...ional-db.patch => python-110-optional-db.patch} | 41 +++---
...nal-ssl.patch => python-111-optional-ssl.patch} | 8 +-
...bzip2.patch => python-112-optional-bzip2.patch} | 8 +-
...l-zlib.patch => python-113-optional-zlib.patch} | 8 +-
.../python/python-2.7-001-support-for-build.patch | 154 ---------------------
.../python-2.7-002-cross-compile-variable.patch | 55 --------
...on-2.7-003-no-import-when-cross-compiling.patch | 26 ----
| 111 ---------------
| 38 -----
.../python/python-2.7-006-disable-extensions.patch | 102 --------------
.../python-2.7-007-do-not-generate-pyo-files.patch | 40 ------
.../python/python-2.7-008-reread-environment.patch | 65 ---------
...python-2.7-010-change-pyconfig-h-location.patch | 76 ----------
package/python/python-2.7-011-no-rpath.patch | 75 ----------
.../python-2.7-012-correct-32bit-64bit-check.patch | 55 --------
.../python-2.7-013-fix-linux-3-compilation.patch | 24 ----
.../python-2.7-014-verbose-module-build.patch | 19 ---
...7-015-distutils-cross-compilation-support.patch | 125 -----------------
.../python-2.7-016-cross-compile-getaddrinfo.patch | 15 --
package/python/python.mk | 49 +++----
39 files changed, 589 insertions(+), 1189 deletions(-)
create mode 100644 package/python/python-001-remove-host-header-path.patch
create mode 100644 package/python/python-002-fix-get-python-inc.patch
create mode 100644 package/python/python-003-properly-detect-if-python-build.patch
create mode 100644 package/python/python-004-sysconfigdata-install-location.patch
create mode 100644 package/python/python-005-pyc-pyo-conditional.patch
create mode 100644 package/python/python-006-cross-compile-getaddrinfo.patch
create mode 100644 package/python/python-007-disable-extensions.patch
create mode 100644 package/python/python-008-distutils-use-python-sysroot.patch
create mode 100644 package/python/python-009-no-termcap-host-path.patch
rename package/python/{python-2.7-100-optional-test-modules.patch => python-100-optional-test-modules.patch} (71%)
rename package/python/{python-2.7-101-optional-pydoc.patch => python-101-optional-pydoc.patch} (77%)
rename package/python/{python-2.7-102-optional-2to3.patch => python-102-optional-2to3.patch} (70%)
rename package/python/{python-2.7-103-optional-sqlite.patch => python-103-optional-sqlite.patch} (57%)
rename package/python/{python-2.7-104-optional-tk.patch => python-104-optional-tk.patch} (59%)
rename package/python/{python-2.7-105-optional-curses.patch => python-105-optional-curses.patch} (75%)
rename package/python/{python-2.7-106-optional-expat.patch => python-106-optional-expat.patch} (84%)
rename package/python/{python-2.7-107-optional-codecs-cjk.patch => python-107-optional-codecs-cjk.patch} (84%)
rename package/python/{python-2.7-108-optional-nis.patch => python-108-optional-nis.patch} (85%)
rename package/python/{python-2.7-109-optional-unicodedata.patch => python-109-optional-unicodedata.patch} (83%)
rename package/python/{python-2.7-110-optional-db.patch => python-110-optional-db.patch} (75%)
rename package/python/{python-2.7-111-optional-ssl.patch => python-111-optional-ssl.patch} (83%)
rename package/python/{python-2.7-112-optional-bzip2.patch => python-112-optional-bzip2.patch} (83%)
rename package/python/{python-2.7-113-optional-zlib.patch => python-113-optional-zlib.patch} (84%)
delete mode 100644 package/python/python-2.7-001-support-for-build.patch
delete mode 100644 package/python/python-2.7-002-cross-compile-variable.patch
delete mode 100644 package/python/python-2.7-003-no-import-when-cross-compiling.patch
delete mode 100644 package/python/python-2.7-004-no-host-headers-libs.patch
delete mode 100644 package/python/python-2.7-005-staging-headers-libs.patch
delete mode 100644 package/python/python-2.7-006-disable-extensions.patch
delete mode 100644 package/python/python-2.7-007-do-not-generate-pyo-files.patch
delete mode 100644 package/python/python-2.7-008-reread-environment.patch
delete mode 100644 package/python/python-2.7-010-change-pyconfig-h-location.patch
delete mode 100644 package/python/python-2.7-011-no-rpath.patch
delete mode 100644 package/python/python-2.7-012-correct-32bit-64bit-check.patch
delete mode 100644 package/python/python-2.7-013-fix-linux-3-compilation.patch
delete mode 100644 package/python/python-2.7-014-verbose-module-build.patch
delete mode 100644 package/python/python-2.7-015-distutils-cross-compilation-support.patch
delete mode 100644 package/python/python-2.7-016-cross-compile-getaddrinfo.patch
--git a/package/python/python-001-remove-host-header-path.patch b/package/python/python-001-remove-host-header-path.patch
new file mode 100644
index 0000000..206751d
--- /dev/null
+++ b/package/python/python-001-remove-host-header-path.patch
@@ -0,0 +1,32 @@
+setup.py: do not add invalid header locations
+
+This piece of code incorrectly adds /usr/include to
+self.compiler.include_dirs, and results in the following invalid
+compilation line:
+
+/home/thomas/projets/buildroot/output/host/usr/bin/arm-none-linux-gnueabi-gcc -fPIC \
+ -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 \
+ -pipe -Os -DNDEBUG -g -O3 -Wall -Wstrict-prototypes \
+ -I/usr/include -I. -IInclude -I./Include \
+ -I/home/thomas/projets/buildroot/output/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/include \
+ -I/home/thomas/projets/buildroot/output/build/python-2.7.6/Include \
+ -I/home/thomas/projets/buildroot/output/build/python-2.7.6 \
+ -c /home/thomas/projets/buildroot/output/build/python-2.7.6/Modules/mathmodule.c \
+ -o build/temp.linux2-arm-2.7/home/thomas/projets/buildroot/output/build/python-2.7.6/Modules/mathmodule.o
+cc1: warning: include location "/usr/include" is unsafe for cross-compilation [-Wpoison-system-directories]
+[...]
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Index: b/setup.py
+===================================================================
+--- a/setup.py
++++ b/setup.py
+@@ -478,7 +478,7 @@
+ for directory in reversed(options.dirs):
+ add_dir_to_list(dir_list, directory)
+
+- if os.path.normpath(sys.prefix) != '/usr' \
++ if False and 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
diff --git a/package/python/python-002-fix-get-python-inc.patch b/package/python/python-002-fix-get-python-inc.patch
new file mode 100644
index 0000000..bfee03a
--- /dev/null
+++ b/package/python/python-002-fix-get-python-inc.patch
@@ -0,0 +1,36 @@
+Fix get_python_inc() for cross-compilation
+
+When we are cross compiling, doing os.path.dirname(sys.executable) to
+get the build directory is incorrect, because we're executing the host
+Python to build things for the target. Instead, we should use the
+project_base variable.
+
+This fixes cross-compilation, which was adding incorrect header paths
+pointing to the location where the host Python was built:
+
+/home/thomas/projets/buildroot/output/host/usr/bin/arm-none-linux-gnueabi-gcc -fPIC -fno-strict-aliasing \
+ -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -pipe -Os -DNDEBUG -g -O3 -Wall -Wstrict-prototypes \
+ -I/usr/include -I. -IInclude -I./Include -I/home/thomas/projets/buildroot/output/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/include \
+ -I/home/thomas/projets/buildroot/output/host/usr/bin/Include -I/home/thomas/projets/buildroot/output/host/usr/bin \
+ -c /home/thomas/projets/buildroot/output/build/python-2.7.6/Modules/_struct.c \
+ -o build/temp.linux2-arm-2.7/home/thomas/projets/buildroot/output/build/python-2.7.6/Modules/_struct.o
+
+This patch allows to fix the
+/home/thomas/projets/buildroot/output/host/usr/bin/Include and
+/home/thomas/projets/buildroot/output/host/usr/bin paths that are
+incorrectly added to the header paths.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Index: b/Lib/distutils/sysconfig.py
+===================================================================
+--- a/Lib/distutils/sysconfig.py
++++ b/Lib/distutils/sysconfig.py
+@@ -79,7 +79,7 @@
+
+ if os.name == "posix":
+ if python_build:
+- buildir = os.path.dirname(sys.executable)
++ buildir = project_base
+ if plat_specific:
+ # python.h is located in the buildir
+ inc_dir = buildir
diff --git a/package/python/python-003-properly-detect-if-python-build.patch b/package/python/python-003-properly-detect-if-python-build.patch
new file mode 100644
index 0000000..3fb865f
--- /dev/null
+++ b/package/python/python-003-properly-detect-if-python-build.patch
@@ -0,0 +1,23 @@
+distutils: fix build_ext check to find whether we're building Python or not
+
+The build_ext logic uses
+sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")) to
+determine whether we're building a third-party Python extension, or a
+built-in Python extension. However, this check is wrong in
+cross-compilation mode, and instead, the sysconfig.python_build
+variable should be used.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Index: b/Lib/distutils/command/build_ext.py
+===================================================================
+--- a/Lib/distutils/command/build_ext.py
++++ b/Lib/distutils/command/build_ext.py
+@@ -235,7 +235,7 @@
+ # Python's library directory must be appended to library_dirs
+ # See Issues: #1600860, #4366
+ if (sysconfig.get_config_var('Py_ENABLE_SHARED')):
+- if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")):
++ if not sysconfig.python_build:
+ # building third party extensions
+ self.library_dirs.append(sysconfig.get_config_var('LIBDIR'))
+ else:
diff --git a/package/python/python-004-sysconfigdata-install-location.patch b/package/python/python-004-sysconfigdata-install-location.patch
new file mode 100644
index 0000000..940dde7
--- /dev/null
+++ b/package/python/python-004-sysconfigdata-install-location.patch
@@ -0,0 +1,76 @@
+Change the install location of _sysconfigdata.py
+
+The _sysconfigdata.py module contains definitions that are needed when
+building Python modules. In cross-compilation mode, when building
+Python extensions for the target, we need to use the _sysconfigdata.py
+of the target Python while executing the host Python.
+
+However until now, the _sysconfigdata.py module was installed in
+build/lib.<arch>-<version> directory, together with a number of
+architecture-specific shared objects, which cannot be used with the
+host Python.
+
+To solve this problem, this patch moves _sysconfigdata.py to a
+separate location, build/sysconfigdata.<arch>-<version>/, and only
+this directory gets added to the PYTHONPATH of the host Python
+interpreter when building Python modules for the target.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+Index: b/Makefile.pre.in
+===================================================================
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -449,6 +449,9 @@
+ # sys.path fixup -- see Modules/getpath.c.
+ pybuilddir.txt: $(BUILDPYTHON)
+ $(RUNSHARED) $(PYTHON_FOR_BUILD) -S -m sysconfig --generate-posix-vars
++ echo `cat pybuilddir.txt`/sysconfigdata > pysysconfigdatadir.txt
++ mkdir -p `cat pysysconfigdatadir.txt`
++ cp `cat pybuilddir.txt`/_sysconfigdata.py `cat pysysconfigdatadir.txt`
+
+ # Build the shared modules
+ # Under GNU make, MAKEFLAGS are sorted and normalized; the 's' for
+@@ -965,7 +968,7 @@
+ else true; \
+ fi; \
+ done
+- @for i in $(srcdir)/Lib/*.py `cat pybuilddir.txt`/_sysconfigdata.py $(srcdir)/Lib/*.doc $(srcdir)/Lib/*.egg-info ; \
++ @for i in $(srcdir)/Lib/*.py $(srcdir)/Lib/*.doc $(srcdir)/Lib/*.egg-info ; \
+ do \
+ if test -x $$i; then \
+ $(INSTALL_SCRIPT) $$i $(DESTDIR)$(LIBDEST); \
+@@ -975,6 +978,11 @@
+ echo $(INSTALL_DATA) $$i $(LIBDEST); \
+ fi; \
+ done
++ $(INSTALL_DATA) `cat pysysconfigdatadir.txt`/_sysconfigdata.py \
++ $(DESTDIR)$(LIBDEST)
++ mkdir -p $(DESTDIR)$(LIBDEST)/sysconfigdata
++ $(INSTALL_DATA) `cat pysysconfigdatadir.txt`/_sysconfigdata.py \
++ $(DESTDIR)$(LIBDEST)/sysconfigdata
+ @for d in $(LIBSUBDIRS); \
+ do \
+ a=$(srcdir)/Lib/$$d; \
+@@ -1299,7 +1307,7 @@
+ Modules/Setup Modules/Setup.local Modules/Setup.config \
+ Modules/ld_so_aix Modules/python.exp Misc/python.pc
+ -rm -f python*-gdb.py
+- -rm -f pybuilddir.txt
++ -rm -f pybuilddir.txt pysysconfigdatadir.txt
+ find $(srcdir)/[a-zA-Z]* '(' -name '*.fdc' -o -name '*~' \
+ -o -name '[@,#]*' -o -name '*.old' \
+ -o -name '*.orig' -o -name '*.rej' \
+Index: b/configure.ac
+===================================================================
+--- a/configure.ac
++++ b/configure.ac
+@@ -30,7 +30,7 @@
+ AC_MSG_ERROR([python$PACKAGE_VERSION interpreter not found])
+ fi
+ AC_MSG_RESULT($interp)
+- PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/plat-$(MACHDEP) '$interp
++ PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pysysconfigdatadir.txt && echo $(abs_builddir)/`cat pysysconfigdatadir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/plat-$(MACHDEP) '$interp
+ fi
+ elif test "$cross_compiling" = maybe; then
+ AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH])
diff --git a/package/python/python-005-pyc-pyo-conditional.patch b/package/python/python-005-pyc-pyo-conditional.patch
new file mode 100644
index 0000000..aa3b330
--- /dev/null
+++ b/package/python/python-005-pyc-pyo-conditional.patch
@@ -0,0 +1,59 @@
+Index: b/Makefile.pre.in
+===================================================================
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -1013,24 +1013,32 @@
+ $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
+ $(DESTDIR)$(LIBDEST)/distutils/tests ; \
+ fi
++ifeq (@PYC_BUILD@,yes)
+ PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+ $(PYTHON_FOR_BUILD) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
+ -d $(LIBDEST) -f \
+ -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
+ $(DESTDIR)$(LIBDEST)
++endif
++ifeq (@PYO_BUILD@,yes)
+ PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+ $(PYTHON_FOR_BUILD) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
+ -d $(LIBDEST) -f \
+ -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
+ $(DESTDIR)$(LIBDEST)
++endif
++ifeq (@PYC_BUILD@,yes)
+ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+ $(PYTHON_FOR_BUILD) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
+ -d $(LIBDEST)/site-packages -f \
+ -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
++endif
++ifeq (@PYO_BUILD@,yes)
+ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+ $(PYTHON_FOR_BUILD) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
+ -d $(LIBDEST)/site-packages -f \
+ -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
++endif
+ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+ $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
+ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+Index: b/configure.ac
+===================================================================
+--- a/configure.ac
++++ b/configure.ac
+@@ -733,6 +733,17 @@
+ ;;
+ esac
+
++AC_SUBST(PYC_BUILD)
++
++AC_ARG_ENABLE(pyc-build,
++ AS_HELP_STRING([--disable-pyc-build], [disable build of pyc files]),
++ [ PYC_BUILD="${enableval}" ], [ PYC_BUILD=yes ])
++
++AC_SUBST(PYO_BUILD)
++
++AC_ARG_ENABLE(pyo-build,
++ AS_HELP_STRING([--disable-pyo-build], [disable build of pyo files]),
++ [ PYO_BUILD="${enableval}" ], [ PYO_BUILD=yes ])
+
+ AC_SUBST(LIBRARY)
+ AC_MSG_CHECKING(LIBRARY)
diff --git a/package/python/python-006-cross-compile-getaddrinfo.patch b/package/python/python-006-cross-compile-getaddrinfo.patch
new file mode 100644
index 0000000..2c8248f
--- /dev/null
+++ b/package/python/python-006-cross-compile-getaddrinfo.patch
@@ -0,0 +1,13 @@
+Index: b/configure.ac
+===================================================================
+--- a/configure.ac
++++ b/configure.ac
+@@ -3337,7 +3337,7 @@
+
+ AC_MSG_RESULT($ac_cv_buggy_getaddrinfo)
+
+-if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
++if test $have_getaddrinfo = no || test "$cross_compiling" != "yes" -a "$ac_cv_buggy_getaddrinfo" = yes
+ then
+ if test $ipv6 = yes
+ then
diff --git a/package/python/python-007-disable-extensions.patch b/package/python/python-007-disable-extensions.patch
new file mode 100644
index 0000000..c03f84c
--- /dev/null
+++ b/package/python/python-007-disable-extensions.patch
@@ -0,0 +1,60 @@
+Index: b/Makefile.pre.in
+===================================================================
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -153,6 +153,8 @@
+ # configure script arguments
+ CONFIG_ARGS= @CONFIG_ARGS@
+
++# disabled extensions
++DISABLED_EXTENSIONS= @DISABLED_EXTENSIONS@
+
+ # Subdirectories with code
+ SRCDIRS= @SRCDIRS@
+@@ -464,6 +466,7 @@
+ esac; \
+ $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \
+ _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \
++ DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" \
+ $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build
+
+ # Build static library
+@@ -1154,7 +1157,8 @@
+ # Install the dynamically loadable modules
+ # This goes into $(exec_prefix)
+ sharedinstall: sharedmods
+- $(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \
++ $(RUNSHARED) DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" \
++ $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \
+ --prefix=$(prefix) \
+ --install-scripts=$(BINDIR) \
+ --install-platlib=$(DESTSHARED) \
+Index: b/configure.ac
+===================================================================
+--- a/configure.ac
++++ b/configure.ac
+@@ -2275,6 +2275,8 @@
+
+ AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+
++AC_SUBST(DISABLED_EXTENSIONS)
++
+ # Check for use of the system expat library
+ AC_MSG_CHECKING(for --with-system-expat)
+ AC_ARG_WITH(system_expat,
+Index: b/setup.py
+===================================================================
+--- a/setup.py
++++ b/setup.py
+@@ -33,7 +33,10 @@
+ COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS"))
+
+ # This global variable is used to hold the list of modules to be disabled.
+-disabled_module_list = []
++try:
++ disabled_module_list = sysconfig.get_config_var("DISABLED_EXTENSIONS").split(" ")
++except KeyError:
++ disabled_module_list = list()
+
+ def add_dir_to_list(dirlist, dir):
+ """Add the directory 'dir' to the list 'dirlist' (at the front) if
diff --git a/package/python/python-008-distutils-use-python-sysroot.patch b/package/python/python-008-distutils-use-python-sysroot.patch
new file mode 100644
index 0000000..7cd7487
--- /dev/null
+++ b/package/python/python-008-distutils-use-python-sysroot.patch
@@ -0,0 +1,54 @@
+Adjust library/header paths for cross-compilation
+
+When cross-compiling third-party extensions, the get_python_inc() or
+get_python_lib() can be called, to return the path to headers or
+libraries. However, they use the sys.prefix of the host Python, which
+returns incorrect paths when cross-compiling (paths pointing to host
+headers and libraries).
+
+In order to fix this, we introduce the _python_sysroot, _python_prefix
+and _python_exec_prefix variables, that allow to override these
+values, and get correct header/library paths when cross-compiling
+third-party Python modules.
+
+The _python_sysroot variable is also used to prefix the LIBDIR value
+taken from the sysconfigdata module.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+Index: b/Lib/distutils/sysconfig.py
+===================================================================
+--- a/Lib/distutils/sysconfig.py
++++ b/Lib/distutils/sysconfig.py
+@@ -19,8 +19,13 @@
+ from distutils.errors import DistutilsPlatformError
+
+ # These are needed in a couple of spots, so just compute them once.
+-PREFIX = os.path.normpath(sys.prefix)
+-EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
++if "_python_sysroot" in os.environ:
++ _sysroot=os.environ.get('_python_sysroot')
++ PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_prefix'))
++ EXEC_PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_exec_prefix'))
++else:
++ PREFIX = os.path.normpath(sys.prefix)
++ EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
+
+ # Path to the base directory of the project. On Windows the binary may
+ # live in project/PCBuild9. If we're dealing with an x64 Windows build,
+Index: b/Lib/distutils/command/build_ext.py
+===================================================================
+--- a/Lib/distutils/command/build_ext.py
++++ b/Lib/distutils/command/build_ext.py
+@@ -237,7 +237,10 @@
+ if (sysconfig.get_config_var('Py_ENABLE_SHARED')):
+ if not sysconfig.python_build:
+ # building third party extensions
+- self.library_dirs.append(sysconfig.get_config_var('LIBDIR'))
++ libdir = sysconfig.get_config_var('LIBDIR')
++ if "_python_sysroot" in os.environ:
++ libdir = os.environ.get("_python_sysroot") + libdir
++ self.library_dirs.append(libdir)
+ else:
+ # building python standard extensions
+ self.library_dirs.append('.')
diff --git a/package/python/python-009-no-termcap-host-path.patch b/package/python/python-009-no-termcap-host-path.patch
new file mode 100644
index 0000000..7df8a32
--- /dev/null
+++ b/package/python/python-009-no-termcap-host-path.patch
@@ -0,0 +1,23 @@
+Don't look in /usr/lib/termcap for libraries
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+
+Index: b/setup.py
+===================================================================
+--- a/setup.py
++++ b/setup.py
+@@ -760,12 +760,9 @@
+ pass # Issue 7384: Already linked against curses or tinfo.
+ elif curses_library:
+ readline_libs.append(curses_library)
+- elif self.compiler.find_library_file(lib_dirs +
+- ['/usr/lib/termcap'],
+- 'termcap'):
++ elif self.compiler.find_library_file(lib_dirs, 'termcap'):
+ readline_libs.append('termcap')
+ exts.append( Extension('readline', ['readline.c'],
+- library_dirs=['/usr/lib/termcap'],
+ extra_link_args=readline_extra_link_args,
+ libraries=readline_libs) )
+ else:
diff --git a/package/python/python-2.7-100-optional-test-modules.patch b/package/python/python-100-optional-test-modules.patch
similarity index 71%
rename from package/python/python-2.7-100-optional-test-modules.patch
rename to package/python/python-100-optional-test-modules.patch
index a988717..a5f7545 100644
--- a/package/python/python-2.7-100-optional-test-modules.patch
+++ b/package/python/python-100-optional-test-modules.patch
@@ -11,19 +11,20 @@ Signed-off-by: Samuel Martin <s.martin49@gmail.com>
configure.in | 6 ++++++
2 files changed, 33 insertions(+), 13 deletions(-)
-Index: Python-2.7.2/Makefile.pre.in
+Index: b/Makefile.pre.in
===================================================================
---- Python-2.7.2.orig/Makefile.pre.in
-+++ Python-2.7.2/Makefile.pre.in
-@@ -856,23 +856,30 @@
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -934,23 +934,40 @@
plat-mac/lib-scriptpackages/SystemEvents \
- plat-mac/lib-scriptpackages/Terminal
+ plat-mac/lib-scriptpackages/Terminal
PLATMACPATH=:plat-mac:plat-mac/lib-scriptpackages
-LIBSUBDIRS= lib-tk lib-tk/test lib-tk/test/test_tkinter \
-- lib-tk/test/test_ttk site-packages test test/data \
+- lib-tk/test/test_ttk site-packages test test/audiodata test/data \
- test/cjkencodings test/decimaltestdata test/xmltestdata test/subprocessdata \
- test/tracedmodules \
-+LIBSUBDIRS= lib-tk site-packages \
++LIBSUBDIRS= lib-tk \
++ site-packages \
encodings compiler hotshot \
- email email/mime email/test email/test/data \
- json json/tests \
@@ -39,31 +40,40 @@ Index: Python-2.7.2/Makefile.pre.in
+ logging bsddb csv importlib wsgiref \
+ lib2to3 lib2to3/fixes lib2to3/pgen2 \
+ ctypes ctypes/macholib idlelib idlelib/Icons \
-+ distutils distutils/command $(XMLLIBSUBDIRS) \
++ distutils distutils/command $(XMLLIBSUBDIRS) \
multiprocessing multiprocessing/dummy \
- unittest unittest/test \
+ unittest \
lib-old \
curses pydoc_data $(MACHDEPS)
+
++TESTSUBDIRS = lib-tk/test lib-tk/test/test_tkinter \
++ lib-tk/test/test_ttk \
++ test test/audiodata test/data \
++ test/cjkencodings test/decimaltestdata test/xmltestdata test/subprocessdata \
++ test/tracedmodules \
++ email/test email/test/data \
++ json/tests \
++ sqlite3/test \
++ bsddb/test \
++ lib2to3/tests \
++ lib2to3/tests/data lib2to3/tests/data/fixers lib2to3/tests/data/fixers/myfixes \
++ ctypes/test \
++ distutils/tests \
++ unittest/test
++
+ifeq (@TEST_MODULES@,yes)
-+LIBSUBDIRS += lib-tk/test lib-tk/test/test_tkinter \
-+ lib-tk/test/test_ttk test test/data \
-+ test/cjkencodings test/decimaltestdata test/xmltestdata test/subprocessdata \
-+ test/tracedmodules email/test email/test/data \
-+ json/tests sqlite3/test bsddb/test lib2to3/tests \
-+ lib2to3/tests/data lib2to3/tests/data/fixers lib2to3/tests/data/fixers/myfixes \
-+ ctypes/test distutils/tests unittest/test
++LIBSUBDIRS += $(TESTSUBDIRS)
+endif
+
libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
@for i in $(SCRIPTDIR) $(LIBDEST); \
do \
-Index: Python-2.7.2/configure.in
+Index: b/configure.ac
===================================================================
---- Python-2.7.2.orig/configure.in
-+++ Python-2.7.2/configure.in
-@@ -2408,6 +2408,12 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -2614,6 +2614,12 @@
fi
diff --git a/package/python/python-2.7-101-optional-pydoc.patch b/package/python/python-101-optional-pydoc.patch
similarity index 77%
rename from package/python/python-2.7-101-optional-pydoc.patch
rename to package/python/python-101-optional-pydoc.patch
index ccc937b..c9b05bd 100644
--- a/package/python/python-2.7-101-optional-pydoc.patch
+++ b/package/python/python-101-optional-pydoc.patch
@@ -12,21 +12,21 @@ Signed-off-by: Samuel Martin <s.martin49@gmail.com>
setup.py | 10 +++++++---
3 files changed, 17 insertions(+), 4 deletions(-)
-Index: Python-2.7.2/Makefile.pre.in
+Index: b/Makefile.pre.in
===================================================================
---- Python-2.7.2.orig/Makefile.pre.in
-+++ Python-2.7.2/Makefile.pre.in
-@@ -868,7 +868,7 @@
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -947,7 +947,7 @@
multiprocessing multiprocessing/dummy \
unittest \
lib-old \
- curses pydoc_data $(MACHDEPS)
+ curses $(MACHDEPS)
- ifeq (@TEST_MODULES@,yes)
- LIBSUBDIRS += lib-tk/test lib-tk/test/test_tkinter \
-@@ -880,6 +880,10 @@
- ctypes/test distutils/tests unittest/test
+ TESTSUBDIRS = lib-tk/test lib-tk/test/test_tkinter \
+ lib-tk/test/test_ttk \
+@@ -968,6 +968,10 @@
+ LIBSUBDIRS += $(TESTSUBDIRS)
endif
+ifeq (@PYDOC@,yes)
@@ -36,12 +36,12 @@ Index: Python-2.7.2/Makefile.pre.in
libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
@for i in $(SCRIPTDIR) $(LIBDEST); \
do \
-Index: Python-2.7.2/configure.in
+Index: b/configure.ac
===================================================================
---- Python-2.7.2.orig/configure.in
-+++ Python-2.7.2/configure.in
-@@ -2407,6 +2407,11 @@
- esac])
+--- a/configure.ac
++++ b/configure.ac
+@@ -2613,6 +2613,11 @@
+ AC_CHECK_FUNCS(pthread_atfork)
fi
+AC_SUBST(PYDOC)
@@ -52,11 +52,11 @@ Index: Python-2.7.2/configure.in
AC_SUBST(TEST_MODULES)
-Index: Python-2.7.2/setup.py
+Index: b/setup.py
===================================================================
---- Python-2.7.2.orig/setup.py
-+++ Python-2.7.2/setup.py
-@@ -2092,6 +2092,12 @@
+--- a/setup.py
++++ b/setup.py
+@@ -2205,6 +2205,12 @@
# turn off warnings when deprecated modules are imported
import warnings
warnings.filterwarnings("ignore",category=DeprecationWarning)
@@ -69,7 +69,7 @@ Index: Python-2.7.2/setup.py
setup(# PyPI Metadata (PEP 301)
name = "Python",
version = sys.version.split()[0],
-@@ -2112,9 +2118,7 @@
+@@ -2225,9 +2231,7 @@
ext_modules=[Extension('_struct', ['_struct.c'])],
# Scripts to install
diff --git a/package/python/python-2.7-102-optional-2to3.patch b/package/python/python-102-optional-2to3.patch
similarity index 70%
rename from package/python/python-2.7-102-optional-2to3.patch
rename to package/python/python-102-optional-2to3.patch
index 0321619..586b24b 100644
--- a/package/python/python-2.7-102-optional-2to3.patch
+++ b/package/python/python-102-optional-2to3.patch
@@ -12,50 +12,47 @@ Signed-off-by: Samuel Martin <s.martin49@gmail.com>
setup.py | 5 +++--
3 files changed, 26 insertions(+), 9 deletions(-)
-Index: Python-2.7.2/Makefile.pre.in
+Index: b/Makefile.pre.in
===================================================================
---- Python-2.7.2.orig/Makefile.pre.in
-+++ Python-2.7.2/Makefile.pre.in
-@@ -862,7 +862,6 @@
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -941,7 +941,6 @@
json \
sqlite3 \
logging bsddb csv importlib wsgiref \
- lib2to3 lib2to3/fixes lib2to3/pgen2 \
ctypes ctypes/macholib idlelib idlelib/Icons \
- distutils distutils/command $(XMLLIBSUBDIRS) \
+ distutils distutils/command $(XMLLIBSUBDIRS) \
multiprocessing multiprocessing/dummy \
-@@ -875,8 +874,7 @@
- lib-tk/test/test_ttk test test/data \
- test/cjkencodings test/decimaltestdata test/xmltestdata test/subprocessdata \
- test/tracedmodules email/test email/test/data \
-- json/tests sqlite3/test bsddb/test lib2to3/tests \
-- lib2to3/tests/data lib2to3/tests/data/fixers lib2to3/tests/data/fixers/myfixes \
-+ json/tests sqlite3/test bsddb/test \
- ctypes/test distutils/tests unittest/test
- endif
-
-@@ -884,6 +882,16 @@
+@@ -958,8 +957,6 @@
+ json/tests \
+ sqlite3/test \
+ bsddb/test \
+- lib2to3/tests \
+- lib2to3/tests/data lib2to3/tests/data/fixers lib2to3/tests/data/fixers/myfixes \
+ ctypes/test \
+ distutils/tests \
+ unittest/test
+@@ -972,6 +969,14 @@
LIBSUBDIRS += pydoc_data
endif
+ifeq (@LIB2TO3@,yes)
+LIBSUBDIRS += lib2to3 lib2to3/fixes lib2to3/pgen2
-+ifeq (@TEST_MODULES@,yes)
-+LIBSUBDIRS += lib2to3/tests \
++TESTSUBDIRS += lib2to3/tests \
+ lib2to3/tests/data \
+ lib2to3/tests/data/fixers \
+ lib2to3/tests/data/fixers/myfixes
+endif
-+endif
+
libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
@for i in $(SCRIPTDIR) $(LIBDEST); \
do \
-Index: Python-2.7.2/configure.in
+Index: b/configure.ac
===================================================================
---- Python-2.7.2.orig/configure.in
-+++ Python-2.7.2/configure.in
-@@ -2419,6 +2419,12 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -2625,6 +2625,12 @@
AS_HELP_STRING([--disable-test-modules], [disable test modules]),
[ TEST_MODULES="${enableval}" ], [ TEST_MODULES=yes ])
@@ -68,11 +65,11 @@ Index: Python-2.7.2/configure.in
# Check for enable-ipv6
AH_TEMPLATE(ENABLE_IPV6, [Define if --enable-ipv6 is specified])
AC_MSG_CHECKING([if --enable-ipv6 is specified])
-Index: Python-2.7.2/setup.py
+Index: b/setup.py
===================================================================
---- Python-2.7.2.orig/setup.py
-+++ Python-2.7.2/setup.py
-@@ -2093,10 +2093,11 @@
+--- a/setup.py
++++ b/setup.py
+@@ -2206,10 +2206,11 @@
import warnings
warnings.filterwarnings("ignore",category=DeprecationWarning)
diff --git a/package/python/python-2.7-103-optional-sqlite.patch b/package/python/python-103-optional-sqlite.patch
similarity index 57%
rename from package/python/python-2.7-103-optional-sqlite.patch
rename to package/python/python-103-optional-sqlite.patch
index a915c55..a20afc7 100644
--- a/package/python/python-2.7-103-optional-sqlite.patch
+++ b/package/python/python-103-optional-sqlite.patch
@@ -8,12 +8,12 @@ Signed-off-by: Samuel Martin <s.martin49@gmail.com>
configure.in | 9 +++++++++
2 file changed, 9 insertions(+)
-Index: Python-2.7.2/configure.in
+Index: b/configure.ac
===================================================================
---- Python-2.7.2.orig/configure.in
-+++ Python-2.7.2/configure.in
-@@ -2407,6 +2407,15 @@
- esac])
+--- a/configure.ac
++++ b/configure.ac
+@@ -2613,6 +2613,15 @@
+ AC_CHECK_FUNCS(pthread_atfork)
fi
+AC_SUBST(SQLITE3)
@@ -28,28 +28,33 @@ Index: Python-2.7.2/configure.in
AC_SUBST(PYDOC)
AC_ARG_ENABLE(pydoc,
-Index: Python-2.7.2/Makefile.pre.in
+Index: b/Makefile.pre.in
===================================================================
---- Python-2.7.2.orig/Makefile.pre.in
-+++ Python-2.7.2/Makefile.pre.in
-@@ -875,7 +874,7 @@
- lib-tk/test/test_ttk test test/data \
- test/cjkencodings test/decimaltestdata test/xmltestdata test/subprocessdata \
- test/tracedmodules email/test email/test/data \
-- json/tests sqlite3/test bsddb/test \
-+ json/tests bsddb/test \
- ctypes/test distutils/tests unittest/test
- endif
-
-@@ -884,6 +882,13 @@
- LIBSUBDIRS += pydoc_data
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -939,7 +939,6 @@
+ encodings compiler hotshot \
+ email email/mime \
+ json \
+- sqlite3 \
+ logging bsddb csv importlib wsgiref \
+ ctypes ctypes/macholib idlelib idlelib/Icons \
+ distutils distutils/command $(XMLLIBSUBDIRS) \
+@@ -955,7 +954,6 @@
+ test/tracedmodules \
+ email/test email/test/data \
+ json/tests \
+- sqlite3/test \
+ bsddb/test \
+ ctypes/test \
+ distutils/tests \
+@@ -977,6 +975,11 @@
+ lib2to3/tests/data/fixers/myfixes
endif
+ifeq (@SQLITE3@,yes)
+LIBSUBDIRS += sqlite3
-+ifeq (@TEST_MODULES@,yes)
-+LIBSUBDIRS += sqlite3/test
-+endif
++TESTSUBDIRS += sqlite3/test
+endif
+
libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
diff --git a/package/python/python-2.7-104-optional-tk.patch b/package/python/python-104-optional-tk.patch
similarity index 59%
rename from package/python/python-2.7-104-optional-tk.patch
rename to package/python/python-104-optional-tk.patch
index 9333e33..3e0dd16 100644
--- a/package/python/python-2.7-104-optional-tk.patch
+++ b/package/python/python-104-optional-tk.patch
@@ -8,49 +8,49 @@ Signed-off-by: Samuel Martin <s.martin49@gmail.com>
configure.in | 9 +++++++++
2 files changed, 19 insertions(+), 4 deletions(-)
-Index: Python-2.7.2/Makefile.pre.in
+Index: b/Makefile.pre.in
===================================================================
---- Python-2.7.2.orig/Makefile.pre.in
-+++ Python-2.7.2/Makefile.pre.in
-@@ -856,7 +856,7 @@
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -934,8 +934,7 @@
plat-mac/lib-scriptpackages/SystemEvents \
- plat-mac/lib-scriptpackages/Terminal
+ plat-mac/lib-scriptpackages/Terminal
PLATMACPATH=:plat-mac:plat-mac/lib-scriptpackages
--LIBSUBDIRS= lib-tk site-packages \
+-LIBSUBDIRS= lib-tk \
+- site-packages \
+LIBSUBDIRS= site-packages \
encodings compiler hotshot \
email email/mime \
json \
-@@ -870,8 +870,7 @@
+@@ -947,9 +946,7 @@
+ lib-old \
curses $(MACHDEPS)
- ifeq (@TEST_MODULES@,yes)
--LIBSUBDIRS += lib-tk/test lib-tk/test/test_tkinter \
-- lib-tk/test/test_ttk test test/data \
-+LIBSUBDIRS += test test/data \
- test/cjkencodings test/decimaltestdata test/xmltestdata test/subprocessdata \
- test/tracedmodules email/test email/test/data \
- json/tests sqlite3/test bsddb/test \
-@@ -899,6 +898,14 @@
- endif
+-TESTSUBDIRS = lib-tk/test lib-tk/test/test_tkinter \
+- lib-tk/test/test_ttk \
+- test test/audiodata test/data \
++TESTSUBDIRS = test test/audiodata test/data \
+ test/cjkencodings test/decimaltestdata test/xmltestdata test/subprocessdata \
+ test/tracedmodules \
+ email/test email/test/data \
+@@ -980,6 +977,12 @@
+ TESTSUBDIRS += sqlite3/test
endif
+ifeq (@TK@,yes)
+LIBSUBDIRS += lib-tk
-+ifeq (@TEST_MODULES@,yes)
-+LIBSUBDIRS += lib-tk/test lib-tk/test/test_tkinter \
++TESTSUBDIRS += lib-tk/test lib-tk/test/test_tkinter \
+ lib-tk/test/test_ttk
+endif
-+endif
+
libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
@for i in $(SCRIPTDIR) $(LIBDEST); \
do \
-Index: Python-2.7.2/configure.in
+Index: b/configure.ac
===================================================================
---- Python-2.7.2.orig/configure.in
-+++ Python-2.7.2/configure.in
-@@ -2416,6 +2416,15 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -2622,6 +2622,15 @@
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _sqlite3"
fi
diff --git a/package/python/python-2.7-105-optional-curses.patch b/package/python/python-105-optional-curses.patch
similarity index 75%
rename from package/python/python-2.7-105-optional-curses.patch
rename to package/python/python-105-optional-curses.patch
index 7f8da7c..2ae4989 100644
--- a/package/python/python-2.7-105-optional-curses.patch
+++ b/package/python/python-105-optional-curses.patch
@@ -8,21 +8,21 @@ Signed-off-by: Samuel Martin <s.martin49@gmail.com>
configure.in | 9 +++++++++
2 files changed, 14 insertions(+), 1 deletion(-)
-Index: Python-2.7.2/Makefile.pre.in
+Index: b/Makefile.pre.in
===================================================================
---- Python-2.7.2.orig/Makefile.pre.in
-+++ Python-2.7.2/Makefile.pre.in
-@@ -867,7 +867,7 @@
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -944,7 +944,7 @@
multiprocessing multiprocessing/dummy \
unittest \
lib-old \
- curses $(MACHDEPS)
+ $(MACHDEPS)
- ifeq (@TEST_MODULES@,yes)
- LIBSUBDIRS += test test/data \
-@@ -906,6 +906,10 @@
- endif
+ TESTSUBDIRS = test test/audiodata test/data \
+ test/cjkencodings test/decimaltestdata test/xmltestdata test/subprocessdata \
+@@ -983,6 +983,10 @@
+ lib-tk/test/test_ttk
endif
+ifeq (@CURSES@,yes)
@@ -32,11 +32,11 @@ Index: Python-2.7.2/Makefile.pre.in
libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
@for i in $(SCRIPTDIR) $(LIBDEST); \
do \
-Index: Python-2.7.2/configure.in
+Index: b/configure.ac
===================================================================
---- Python-2.7.2.orig/configure.in
-+++ Python-2.7.2/configure.in
-@@ -2425,6 +2425,15 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -2631,6 +2631,15 @@
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _tkinter"
fi
diff --git a/package/python/python-2.7-106-optional-expat.patch b/package/python/python-106-optional-expat.patch
similarity index 84%
rename from package/python/python-2.7-106-optional-expat.patch
rename to package/python/python-106-optional-expat.patch
index 2d8ae74..9eee2cd 100644
--- a/package/python/python-2.7-106-optional-expat.patch
+++ b/package/python/python-106-optional-expat.patch
@@ -15,20 +15,20 @@ Signed-off-by: Samuel Martin <s.martin49@gmail.com>
setup.py | 2 +-
3 files changed, 19 insertions(+), 7 deletions(-)
-Index: Python-2.7.2/Makefile.pre.in
+Index: b/Makefile.pre.in
===================================================================
---- Python-2.7.2.orig/Makefile.pre.in
-+++ Python-2.7.2/Makefile.pre.in
-@@ -863,7 +863,7 @@
- sqlite3 \
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -940,7 +940,7 @@
+ json \
logging bsddb csv importlib wsgiref \
ctypes ctypes/macholib idlelib idlelib/Icons \
-- distutils distutils/command $(XMLLIBSUBDIRS) \
+- distutils distutils/command $(XMLLIBSUBDIRS) \
+ distutils distutils/command \
multiprocessing multiprocessing/dummy \
unittest \
lib-old \
-@@ -910,6 +910,10 @@
+@@ -987,6 +987,10 @@
LIBSUBDIRS += curses
endif
@@ -39,11 +39,11 @@ Index: Python-2.7.2/Makefile.pre.in
libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
@for i in $(SCRIPTDIR) $(LIBDEST); \
do \
-Index: Python-2.7.2/configure.in
+Index: b/configure.ac
===================================================================
---- Python-2.7.2.orig/configure.in
-+++ Python-2.7.2/configure.in
-@@ -2102,13 +2102,21 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -2278,13 +2278,21 @@
AC_SUBST(DISABLED_EXTENSIONS)
# Check for use of the system expat library
@@ -70,11 +70,11 @@ Index: Python-2.7.2/configure.in
# Check for use of the system libffi library
AC_MSG_CHECKING(for --with-system-ffi)
-Index: Python-2.7.2/setup.py
+Index: b/setup.py
===================================================================
---- Python-2.7.2.orig/setup.py
-+++ Python-2.7.2/setup.py
-@@ -1403,7 +1403,7 @@
+--- a/setup.py
++++ b/setup.py
+@@ -1457,7 +1457,7 @@
#
# More information on Expat can be found at www.libexpat.org.
#
diff --git a/package/python/python-2.7-107-optional-codecs-cjk.patch b/package/python/python-107-optional-codecs-cjk.patch
similarity index 84%
rename from package/python/python-2.7-107-optional-codecs-cjk.patch
rename to package/python/python-107-optional-codecs-cjk.patch
index 8ba61fe..1b3acac 100644
--- a/package/python/python-2.7-107-optional-codecs-cjk.patch
+++ b/package/python/python-107-optional-codecs-cjk.patch
@@ -6,11 +6,11 @@ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
configure.in | 6 ++++++
1 file changed, 6 insertions(+)
-Index: Python-2.7.2/configure.in
+Index: b/configure.ac
===================================================================
---- Python-2.7.2.orig/configure.in
-+++ Python-2.7.2/configure.in
-@@ -2424,6 +2424,12 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -2630,6 +2630,12 @@
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _sqlite3"
fi
diff --git a/package/python/python-2.7-108-optional-nis.patch b/package/python/python-108-optional-nis.patch
similarity index 85%
rename from package/python/python-2.7-108-optional-nis.patch
rename to package/python/python-108-optional-nis.patch
index 212f8d6..8749dfc 100644
--- a/package/python/python-2.7-108-optional-nis.patch
+++ b/package/python/python-108-optional-nis.patch
@@ -9,11 +9,11 @@ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
configure.in | 6 ++++++
1 file changed, 6 insertions(+)
-Index: Python-2.7.2/configure.in
+Index: b/configure.ac
===================================================================
---- Python-2.7.2.orig/configure.in
-+++ Python-2.7.2/configure.in
-@@ -2430,6 +2430,12 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -2636,6 +2636,12 @@
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _codecs_kr _codecs_jp _codecs_cn _codecs_tw _codecs_hk"
fi])
diff --git a/package/python/python-2.7-109-optional-unicodedata.patch b/package/python/python-109-optional-unicodedata.patch
similarity index 83%
rename from package/python/python-2.7-109-optional-unicodedata.patch
rename to package/python/python-109-optional-unicodedata.patch
index 229ba8c..2d78818 100644
--- a/package/python/python-2.7-109-optional-unicodedata.patch
+++ b/package/python/python-109-optional-unicodedata.patch
@@ -6,11 +6,11 @@ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
configure.in | 6 ++++++
1 file changed, 6 insertions(+)
-Index: Python-2.7.2/configure.in
+Index: b/configure.ac
===================================================================
---- Python-2.7.2.orig/configure.in
-+++ Python-2.7.2/configure.in
-@@ -2436,6 +2436,12 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -2642,6 +2642,12 @@
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} nis"
fi])
diff --git a/package/python/python-2.7-110-optional-db.patch b/package/python/python-110-optional-db.patch
similarity index 75%
rename from package/python/python-2.7-110-optional-db.patch
rename to package/python/python-110-optional-db.patch
index b32eea9..ea756da 100644
--- a/package/python/python-2.7-110-optional-db.patch
+++ b/package/python/python-110-optional-db.patch
@@ -12,47 +12,44 @@ Signed-off-by: Samuel Martin <s.martin49@gmail.com>
configure.in | 22 ++++++++++++++++++++++
2 files changed, 30 insertions(+), 2 deletions(-)
-Index: Python-2.7.2/Makefile.pre.in
+Index: b/Makefile.pre.in
===================================================================
---- Python-2.7.2.orig/Makefile.pre.in
-+++ Python-2.7.2/Makefile.pre.in
-@@ -861,7 +861,7 @@
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -938,7 +938,7 @@
+ encodings compiler hotshot \
email email/mime \
json \
- sqlite3 \
- logging bsddb csv importlib wsgiref \
+ logging csv importlib wsgiref \
ctypes ctypes/macholib idlelib idlelib/Icons \
distutils distutils/command \
multiprocessing multiprocessing/dummy \
-@@ -873,7 +873,7 @@
- LIBSUBDIRS += test test/data \
- test/cjkencodings test/decimaltestdata test/xmltestdata test/subprocessdata \
- test/tracedmodules email/test email/test/data \
-- json/tests bsddb/test \
-+ json/tests \
- ctypes/test distutils/tests unittest/test
- endif
-
-@@ -914,6 +914,13 @@
+@@ -951,7 +951,6 @@
+ test/tracedmodules \
+ email/test email/test/data \
+ json/tests \
+- bsddb/test \
+ ctypes/test \
+ distutils/tests \
+ unittest/test
+@@ -991,6 +990,11 @@
LIBSUBDIRS += $(XMLLIBSUBDIRS)
endif
+ifeq (@BSDDB@,yes)
+LIBSUBDIRS += bsddb
-+ifeq (@TEST_MODULES@,yes)
-+LIBSUBDIRS += bsddb/test
-+endif
++TESTSUBDIRS += bsddb/test
+endif
+
libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
@for i in $(SCRIPTDIR) $(LIBDEST); \
do \
-Index: Python-2.7.2/configure.in
+Index: b/configure.ac
===================================================================
---- Python-2.7.2.orig/configure.in
-+++ Python-2.7.2/configure.in
-@@ -2436,6 +2436,28 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -2642,6 +2642,28 @@
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} nis"
fi])
diff --git a/package/python/python-2.7-111-optional-ssl.patch b/package/python/python-111-optional-ssl.patch
similarity index 83%
rename from package/python/python-2.7-111-optional-ssl.patch
rename to package/python/python-111-optional-ssl.patch
index 5885b4e..8d4599d 100644
--- a/package/python/python-2.7-111-optional-ssl.patch
+++ b/package/python/python-111-optional-ssl.patch
@@ -6,11 +6,11 @@ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
configure.in | 6 ++++++
1 file changed, 6 insertions(+)
-Index: Python-2.7.2/configure.in
+Index: b/configure.ac
===================================================================
---- Python-2.7.2.orig/configure.in
-+++ Python-2.7.2/configure.in
-@@ -2436,6 +2436,12 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -2642,6 +2642,12 @@
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} nis"
fi])
diff --git a/package/python/python-2.7-112-optional-bzip2.patch b/package/python/python-112-optional-bzip2.patch
similarity index 83%
rename from package/python/python-2.7-112-optional-bzip2.patch
rename to package/python/python-112-optional-bzip2.patch
index 83a2479..ba7dbaa 100644
--- a/package/python/python-2.7-112-optional-bzip2.patch
+++ b/package/python/python-112-optional-bzip2.patch
@@ -5,11 +5,11 @@ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
configure.in | 6 ++++++
1 file changed, 6 insertions(+)
-Index: Python-2.7.2/configure.in
+Index: b/configure.ac
===================================================================
---- Python-2.7.2.orig/configure.in
-+++ Python-2.7.2/configure.in
-@@ -2442,6 +2442,12 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -2648,6 +2648,12 @@
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} ssl"
fi])
diff --git a/package/python/python-2.7-113-optional-zlib.patch b/package/python/python-113-optional-zlib.patch
similarity index 84%
rename from package/python/python-2.7-113-optional-zlib.patch
rename to package/python/python-113-optional-zlib.patch
index f24eb17..19f100b 100644
--- a/package/python/python-2.7-113-optional-zlib.patch
+++ b/package/python/python-113-optional-zlib.patch
@@ -5,11 +5,11 @@ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
configure.in | 6 ++++++
1 file changed, 6 insertions(+)
-Index: Python-2.7.2/configure.in
+Index: b/configure.ac
===================================================================
---- Python-2.7.2.orig/configure.in
-+++ Python-2.7.2/configure.in
-@@ -2448,6 +2448,12 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -2654,6 +2654,12 @@
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} bz2"
fi])
diff --git a/package/python/python-2.7-001-support-for-build.patch b/package/python/python-2.7-001-support-for-build.patch
deleted file mode 100644
index b0430a4..0000000
--- a/package/python/python-2.7-001-support-for-build.patch
+++ /dev/null
@@ -1,154 +0,0 @@
-Add support in Python build system to specify host tools
-
-Python needs a Python interpreter and a "pgen" program to build
-itself. Unfortunately, the Python build system assumes that it can use
-the interpreter and pgen program it has just built to build
-itself. Obviously, this cannot work in cross-compilation mode since
-the interpreter and the pgen program have been built for the target.
-
-Therefore, this patch adds support in the Python build system for the
-new PYTHON_FOR_BUILD and PGEN_FOR_BUILD variables, so that we can
-point Python ./configure script to the Python interpreter and pgen
-program that have been previously built for the host.
-
-Patch ported to python2.7 by Maxime Ripard <ripard@archos.com>, and
-later significantly reworked by Thomas Petazzoni
-<thomas.petazzoni@free-electrons.com>, with some inspiration taken
-from the Python patches of the PTXdist project.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
----
- Makefile.pre.in | 32 +++++++++++++++++---------------
- configure.in | 17 +++++++++++++++++
- 2 files changed, 34 insertions(+), 15 deletions(-)
-
-Index: Python-2.7.2/Makefile.pre.in
-===================================================================
---- Python-2.7.2.orig/Makefile.pre.in
-+++ Python-2.7.2/Makefile.pre.in
-@@ -181,7 +181,8 @@
- UNICODE_OBJS= @UNICODE_OBJS@
-
- PYTHON= python$(EXE)
--BUILDPYTHON= python$(BUILDEXE)
-+BUILDPYTHON= ./python$(BUILDEXE)
-+PYTHON_FOR_BUILD=@PYTHON_FOR_BUILD@
-
- # The task to run while instrument when building the profile-opt target
- PROFILE_TASK= $(srcdir)/Tools/pybench/pybench.py -n 2 --with-gc --with-syscheck
-@@ -213,7 +214,8 @@
-
- ##########################################################################
- # Parser
--PGEN= Parser/pgen$(EXE)
-+BUILDPGEN= Parser/pgen$(EXE)
-+PGEN_FOR_BUILD=@PGEN_FOR_BUILD@
-
- POBJS= \
- Parser/acceler.o \
-@@ -407,8 +409,8 @@
- # Build the shared modules
- sharedmods: $(BUILDPYTHON)
- @case $$MAKEFLAGS in \
-- *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \
-- *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
-+ *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py -q build;; \
-+ *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py build;; \
- esac
-
- # Build static library
-@@ -540,13 +542,13 @@
-
- # Use a stamp file to prevent make -j invoking pgen twice
- $(GRAMMAR_H) $(GRAMMAR_C): Parser/pgen.stamp
--Parser/pgen.stamp: $(PGEN) $(GRAMMAR_INPUT)
-+Parser/pgen.stamp: $(PGEN_FOR_BUILD) $(GRAMMAR_INPUT)
- -@$(INSTALL) -d Include
-- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
-+ $(PGEN_FOR_BUILD) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
- -touch Parser/pgen.stamp
-
--$(PGEN): $(PGENOBJS)
-- $(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN)
-+$(BUILDPGEN): $(PGENOBJS)
-+ $(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(BUILDPGEN)
-
- Parser/grammar.o: $(srcdir)/Parser/grammar.c \
- $(srcdir)/Include/token.h \
-@@ -926,25 +928,25 @@
- done
- $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
- PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-- ./$(BUILDPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
-+ $(PYTHON_FOR_BUILD) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
- -d $(LIBDEST) -f \
- -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
- $(DESTDIR)$(LIBDEST)
- PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-- ./$(BUILDPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
-+ $(PYTHON_FOR_BUILD) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
- -d $(LIBDEST) -f \
- -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
- $(DESTDIR)$(LIBDEST)
- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-- ./$(BUILDPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
-+ $(PYTHON_FOR_BUILD) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
- -d $(LIBDEST)/site-packages -f \
- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-- ./$(BUILDPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
-+ $(PYTHON_FOR_BUILD) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
- -d $(LIBDEST)/site-packages -f \
- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-- ./$(BUILDPYTHON) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()"
-+ $(PYTHON_FOR_BUILD) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()"
-
- # Create the PLATDIR source directory, if one wasn't distributed..
- $(srcdir)/Lib/$(PLATDIR):
-@@ -1049,7 +1051,7 @@
- # Install the dynamically loadable modules
- # This goes into $(exec_prefix)
- sharedinstall: sharedmods
-- $(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py install \
-+ $(RUNSHARED) $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py install \
- --prefix=$(prefix) \
- --install-scripts=$(BINDIR) \
- --install-platlib=$(DESTSHARED) \
-@@ -1188,7 +1190,7 @@
- find . -name '*.gc??' -exec rm -f {} ';'
-
- clobber: clean profile-removal
-- -rm -f $(BUILDPYTHON) $(PGEN) $(LIBRARY) $(LDLIBRARY) $(DLLLIBRARY) \
-+ -rm -f $(BUILDPYTHON) $(BUILDPGEN) $(LIBRARY) $(LDLIBRARY) $(DLLLIBRARY) \
- tags TAGS Parser/pgen.stamp \
- config.cache config.log pyconfig.h Modules/config.c
- -rm -rf build platform
-Index: Python-2.7.2/configure.in
-===================================================================
---- Python-2.7.2.orig/configure.in
-+++ Python-2.7.2/configure.in
-@@ -4305,6 +4305,23 @@
- done
- AC_MSG_RESULT(done)
-
-+if test "$cross_compiling" = "yes"; then
-+ AC_MSG_CHECKING(python for build)
-+ PYTHON_FOR_BUILD="${PYTHON_FOR_BUILD}"
-+ AC_MSG_RESULT($PYTHON_FOR_BUILD)
-+ AC_MSG_CHECKING(pgen for build)
-+ PGEN_FOR_BUILD="${PGEN_FOR_BUILD}"
-+ AC_MSG_RESULT($PGEN_FOR_BUILD)
-+else
-+ PYTHON_FOR_BUILD='$(BUILDPYTHON)'
-+ PGEN_FOR_BUILD='$(BUILDPGEN)'
-+fi
-+
-+AC_SUBST(PYTHON_FOR_BUILD)
-+AC_SUBST(PGEN_FOR_BUILD)
-+AC_ARG_VAR(PYTHON_FOR_BUILD,[build system Python])
-+AC_ARG_VAR(PGEN_FOR_BUILD,[build system Python pgen])
-+
- # generate output files
- AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc)
- AC_CONFIG_FILES([Modules/ld_so_aix], [chmod +x Modules/ld_so_aix])
diff --git a/package/python/python-2.7-002-cross-compile-variable.patch b/package/python/python-2.7-002-cross-compile-variable.patch
deleted file mode 100644
index f91ee71..0000000
--- a/package/python/python-2.7-002-cross-compile-variable.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-Pass a CROSS_COMPILING variable to setup.py
-
-The setup.py script in the Python source code plays a significant role
-in the Python build process. It is responsible for building all the
-modules and extensions, and due to this, does various checks that need
-to be adjusted when we are cross-compiling.
-
-For that reason, this patch makes sure that a CROSS_COMPILING variable
-is passed in the environment of the setup.py script. Later patches in
-the stack make use of this variable.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
----
- Makefile.pre.in | 6 +++---
- configure.in | 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
-@@ -409,8 +409,8 @@
- # Build the shared modules
- sharedmods: $(BUILDPYTHON)
- @case $$MAKEFLAGS in \
-- *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py -q build;; \
-- *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py build;; \
-+ *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' CROSS_COMPILING=@CROSS_COMPILING@ $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py -q build;; \
-+ *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' CROSS_COMPILING=@CROSS_COMPILING@ $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py build;; \
- esac
-
- # Build static library
-@@ -1051,7 +1051,7 @@
- # Install the dynamically loadable modules
- # This goes into $(exec_prefix)
- sharedinstall: sharedmods
-- $(RUNSHARED) $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py install \
-+ $(RUNSHARED) CROSS_COMPILING=@CROSS_COMPILING@ $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py install \
- --prefix=$(prefix) \
- --install-scripts=$(BINDIR) \
- --install-platlib=$(DESTSHARED) \
-Index: Python-2.7.2/configure.in
-===================================================================
---- Python-2.7.2.orig/configure.in
-+++ Python-2.7.2/configure.in
-@@ -4322,6 +4322,9 @@
- AC_ARG_VAR(PYTHON_FOR_BUILD,[build system Python])
- AC_ARG_VAR(PGEN_FOR_BUILD,[build system Python pgen])
-
-+CROSS_COMPILING=$cross_compiling
-+AC_SUBST(CROSS_COMPILING)
-+
- # generate output files
- AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc)
- AC_CONFIG_FILES([Modules/ld_so_aix], [chmod +x Modules/ld_so_aix])
diff --git a/package/python/python-2.7-003-no-import-when-cross-compiling.patch b/package/python/python-2.7-003-no-import-when-cross-compiling.patch
deleted file mode 100644
index 17d6702..0000000
--- a/package/python/python-2.7-003-no-import-when-cross-compiling.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-Disable import check when cross-compiling
-
-Once Python has compiled an extension (i.e some C code, potentially
-linked to a library), it tries to import it. This cannot work in
-cross-compilation mode, so we just disable this check.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
----
- setup.py | 4 ++++
- 1 file changed, 4 insertions(+)
-
-Index: Python-2.7.2/setup.py
-===================================================================
---- Python-2.7.2.orig/setup.py
-+++ Python-2.7.2/setup.py
-@@ -304,6 +304,10 @@
- self.announce('WARNING: skipping import check for Cygwin-based "%s"'
- % ext.name)
- return
-+ if os.environ.get('CROSS_COMPILING') == 'yes':
-+ self.announce('WARNING: skipping import check for cross compiled "%s"'
-+ % ext.name)
-+ return
- ext_filename = os.path.join(
- self.build_lib,
- self.get_ext_filename(self.get_ext_fullname(ext.name)))
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 c0c528a..0000000
--- 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):
diff --git a/package/python/python-2.7-005-staging-headers-libs.patch b/package/python/python-2.7-005-staging-headers-libs.patch
deleted file mode 100644
index cd378f2..0000000
--- a/package/python/python-2.7-005-staging-headers-libs.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-Tell setup.py the location of headers/libraries
-
-Allow the libraries detection routine to look for headers and libs in
-other directories than /usr/include or /usr/lib through the
-environment variables PYTHON_MODULES_INCLUDE and PYTHON_MODULES_LIB.
-
-We can then use it to look for libraries in the buildroot staging
-directory.
-
-Patch ported to python2.7 by Maxime Ripard <ripard@archos.com>
----
- setup.py | 13 +++++++++++++
- 1 file changed, 13 insertions(+)
-
-Index: Python-2.7.2/setup.py
-===================================================================
---- Python-2.7.2.orig/setup.py
-+++ Python-2.7.2/setup.py
-@@ -372,6 +372,19 @@
- os.unlink(tmpfile)
-
- def detect_modules(self):
-+ try:
-+ modules_include_dirs = os.environ["PYTHON_MODULES_INCLUDE"].split()
-+ except KeyError:
-+ modules_include_dirs = ['/usr/include']
-+ try:
-+ modules_lib_dirs = os.environ["PYTHON_MODULES_LIB"].split()
-+ except KeyError:
-+ modules_lib_dirs = ['/usr/lib']
-+ for dir in modules_include_dirs:
-+ add_dir_to_list(self.compiler.include_dirs, dir)
-+ for dir in modules_lib_dirs:
-+ add_dir_to_list(self.compiler.library_dirs, dir)
-+
- # Ensure that /usr/local is always used
- if os.environ.get('CROSS_COMPILING') != 'yes':
- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
diff --git a/package/python/python-2.7-006-disable-extensions.patch b/package/python/python-2.7-006-disable-extensions.patch
deleted file mode 100644
index f62a50f..0000000
--- a/package/python/python-2.7-006-disable-extensions.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-Add infrastructure to disable the build of certain extensions
-
-Some of the extensions part of the Python core have dependencies on
-external libraries (sqlite, tk, etc.) or are relatively big and not
-necessarly always useful (CJK codecs for example). By extensions, we
-mean part of Python modules that are written in C and therefore
-compiled to binary code.
-
-Therefore, we introduce a small infrastructure that allows to disable
-some of those extensions. This can be done inside the configure.in by
-adding values to the DISABLED_EXTENSIONS variable (which is a
-word-separated list of extensions).
-
-The implementation works as follow :
-
- * configure.in defines a DISABLED_EXTENSIONS variable, which is
- substituted (so that when Makefile.pre is generated from
- Makefile.pre.in, the value of the variable is substituted). For
- now, this DISABLED_EXTENSIONS variable is empty, later patches will
- use it.
-
- * Makefile.pre.in passes the DISABLED_EXTENSIONS value down to the
- variables passed in the environment when calling the setup.py
- script that actually builds and installs those extensions.
-
- * setup.py is modified so that the existing "disabled_module_list" is
- filled with those pre-disabled extensions listed in
- DISABLED_EXTENSIONS.
-
-Patch ported to python2.7 by Maxime Ripard <ripard@archos.com>, and
-then extended by Thomas Petazzoni
-<thomas.petazzoni@free-electrons.com>.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
----
- Makefile.pre.in | 8 +++++---
- configure.in | 2 ++
- setup.py | 5 ++++-
- 3 files changed, 11 insertions(+), 4 deletions(-)
-
-Index: Python-2.7.2/Makefile.pre.in
-===================================================================
---- Python-2.7.2.orig/Makefile.pre.in
-+++ Python-2.7.2/Makefile.pre.in
-@@ -144,6 +144,8 @@
- # configure script arguments
- CONFIG_ARGS= @CONFIG_ARGS@
-
-+# disabled extensions
-+DISABLED_EXTENSIONS= @DISABLED_EXTENSIONS@
-
- # Subdirectories with code
- SRCDIRS= @SRCDIRS@
-@@ -409,8 +411,8 @@
- # Build the shared modules
- sharedmods: $(BUILDPYTHON)
- @case $$MAKEFLAGS in \
-- *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' CROSS_COMPILING=@CROSS_COMPILING@ $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py -q build;; \
-- *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' CROSS_COMPILING=@CROSS_COMPILING@ $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py build;; \
-+ *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;; \
- esac
-
- # Build static library
-@@ -1051,7 +1053,7 @@
- # Install the dynamically loadable modules
- # This goes into $(exec_prefix)
- sharedinstall: sharedmods
-- $(RUNSHARED) CROSS_COMPILING=@CROSS_COMPILING@ $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py install \
-+ $(RUNSHARED) CROSS_COMPILING=@CROSS_COMPILING@ DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py install \
- --prefix=$(prefix) \
- --install-scripts=$(BINDIR) \
- --install-platlib=$(DESTSHARED) \
-Index: Python-2.7.2/configure.in
-===================================================================
---- Python-2.7.2.orig/configure.in
-+++ Python-2.7.2/configure.in
-@@ -2098,6 +2098,8 @@
-
- AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
-
-+AC_SUBST(DISABLED_EXTENSIONS)
-+
- # Check for use of the system expat library
- AC_MSG_CHECKING(for --with-system-expat)
- AC_ARG_WITH(system_expat,
-Index: Python-2.7.2/setup.py
-===================================================================
---- Python-2.7.2.orig/setup.py
-+++ Python-2.7.2/setup.py
-@@ -21,7 +21,10 @@
- COMPILED_WITH_PYDEBUG = hasattr(sys, 'gettotalrefcount')
-
- # This global variable is used to hold the list of modules to be disabled.
--disabled_module_list = []
-+try:
-+ disabled_module_list = sysconfig.get_config_var("DISABLED_EXTENSIONS").split(" ")
-+except KeyError:
-+ disabled_module_list = list()
-
- def add_dir_to_list(dirlist, dir):
- """Add the directory 'dir' to the list 'dirlist' (at the front) if
diff --git a/package/python/python-2.7-007-do-not-generate-pyo-files.patch b/package/python/python-2.7-007-do-not-generate-pyo-files.patch
deleted file mode 100644
index 4ae5ef5..0000000
--- a/package/python/python-2.7-007-do-not-generate-pyo-files.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-Do not generate .pyo files
-
-By default, the Python installation byte-compiles all modules in two
-forms: the normal bytecode (.pyc) and an optimized bytecode (.pyo).
-
-According to
-http://www.network-theory.co.uk/docs/pytut/CompiledPythonfiles.html,
-the optimization do not do anything useful, and generating both the
-"non-optimized" and "optimized" bytecode variants takes time.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
----
- Makefile.pre.in | 9 ---------
- 1 file changed, 9 deletions(-)
-
-Index: Python-2.7.2/Makefile.pre.in
-===================================================================
---- Python-2.7.2.orig/Makefile.pre.in
-+++ Python-2.7.2/Makefile.pre.in
-@@ -934,20 +934,11 @@
- -d $(LIBDEST) -f \
- -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
- $(DESTDIR)$(LIBDEST)
-- PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-- $(PYTHON_FOR_BUILD) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
-- -d $(LIBDEST) -f \
-- -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
-- $(DESTDIR)$(LIBDEST)
- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
- $(PYTHON_FOR_BUILD) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
- -d $(LIBDEST)/site-packages -f \
- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-- $(PYTHON_FOR_BUILD) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
-- -d $(LIBDEST)/site-packages -f \
-- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
-- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
- $(PYTHON_FOR_BUILD) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()"
-
- # Create the PLATDIR source directory, if one wasn't distributed..
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 4ca22a4..0000000
--- 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(" ")
diff --git a/package/python/python-2.7-010-change-pyconfig-h-location.patch b/package/python/python-2.7-010-change-pyconfig-h-location.patch
deleted file mode 100644
index 9b95ddb..0000000
--- a/package/python/python-2.7-010-change-pyconfig-h-location.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-Change the location of pyconfig.h
-
-The Python interpreter has a really strange behaviour: at *runtime*,
-it reads a Makefile and a header file named pyconfig.h to get some
-information about the configuration.
-
-The Makefile is located in usr/lib/python2.7/config, which is fine
-since this location is kept on the target.
-
-However, by default, the pyconfig.h is installed in
-usr/include/python2.7, but we completely remove the usr/include
-directory for the target. Since making an exception just for
-pyconfig.h is annoying, this patch also installs pyconfig.h to
-usr/lib/python2.7/config, and modifies the sysconfig module so that it
-looks in this location instead of usr/include.
-
-The pyconfig.h is still kept in usr/include/python2.7, because it is
-needed in the $(STAGING_DIR) when building third-party Python
-extensions that contain C code.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
----
- Lib/distutils/sysconfig.py | 3 ++-
- Lib/sysconfig.py | 2 +-
- Makefile.pre.in | 3 ++-
- 3 files changed, 5 insertions(+), 3 deletions(-)
-
-Index: Python-2.7.2/Lib/distutils/sysconfig.py
-===================================================================
---- Python-2.7.2.orig/Lib/distutils/sysconfig.py
-+++ Python-2.7.2/Lib/distutils/sysconfig.py
-@@ -193,7 +193,8 @@
- else:
- inc_dir = project_base
- else:
-- inc_dir = get_python_inc(plat_specific=1)
-+ lib_dir = get_python_lib(plat_specific=1, standard_lib=1)
-+ inc_dir = os.path.join(lib_dir, "config")
- if get_python_version() < '2.2':
- config_h = 'config.h'
- else:
-Index: Python-2.7.2/Lib/sysconfig.py
-===================================================================
---- Python-2.7.2.orig/Lib/sysconfig.py
-+++ Python-2.7.2/Lib/sysconfig.py
-@@ -356,7 +356,7 @@
- else:
- inc_dir = _PROJECT_BASE
- else:
-- inc_dir = get_path('platinclude')
-+ inc_dir = os.path.join(get_path('stdlib'), "config")
- return os.path.join(inc_dir, 'pyconfig.h')
-
- def get_scheme_names():
-Index: Python-2.7.2/Makefile.pre.in
-===================================================================
---- Python-2.7.2.orig/Makefile.pre.in
-+++ Python-2.7.2/Makefile.pre.in
-@@ -972,7 +972,6 @@
- echo $(INSTALL_DATA) $$i $(INCLUDEPY); \
- $(INSTALL_DATA) $$i $(DESTDIR)$(INCLUDEPY); \
- done
-- $(INSTALL_DATA) pyconfig.h $(DESTDIR)$(CONFINCLUDEPY)/pyconfig.h
-
- # Install the library and miscellaneous stuff needed for extending/embedding
- # This goes into $(exec_prefix)
-@@ -1006,6 +1005,8 @@
- $(INSTALL_DATA) Modules/python.o $(DESTDIR)$(LIBPL)/python.o
- $(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config.c.in
- $(INSTALL_DATA) Makefile $(DESTDIR)$(LIBPL)/Makefile
-+ $(INSTALL_DATA) pyconfig.h $(DESTDIR)$(LIBPL)/pyconfig.h
-+ $(INSTALL_DATA) pyconfig.h $(DESTDIR)$(CONFINCLUDEPY)/pyconfig.h
- $(INSTALL_DATA) Modules/Setup $(DESTDIR)$(LIBPL)/Setup
- $(INSTALL_DATA) Modules/Setup.local $(DESTDIR)$(LIBPL)/Setup.local
- $(INSTALL_DATA) Modules/Setup.config $(DESTDIR)$(LIBPL)/Setup.config
diff --git a/package/python/python-2.7-011-no-rpath.patch b/package/python/python-2.7-011-no-rpath.patch
deleted file mode 100644
index 3422dce..0000000
--- a/package/python/python-2.7-011-no-rpath.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-Remove runtime library paths
-
-For some extensions (bsddb, sqlite and dbm), Python setup.py script
-hardcode a runtime path (rpath) into the extension. However, this
-runtime path is incorrect (because it points to the location of the
-library directory on the development machine) and useless (because on
-the target, all useful libraries are in a standard directory searched
-by the dynamic loader). For those reasons, we just get rid of the
-runtime paths in cross-compilation mode.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
----
- setup.py | 21 ++++++++++++++++++---
- 1 file changed, 18 insertions(+), 3 deletions(-)
-
-Index: Python-2.7.2/setup.py
-===================================================================
---- Python-2.7.2.orig/setup.py
-+++ Python-2.7.2/setup.py
-@@ -997,6 +997,12 @@
- print "bsddb lib dir:", dblib_dir, " inc dir:", db_incdir
- db_incs = [db_incdir]
- dblibs = [dblib]
-+
-+ if os.environ.get('CROSS_COMPILING') == 'yes':
-+ bsddb_runtime_library_dir = None
-+ else:
-+ bsddb_runtime_library_dir = dblib_dir
-+
- # We add the runtime_library_dirs argument because the
- # BerkeleyDB lib we're linking against often isn't in the
- # system dynamic library search path. This is usually
-@@ -1006,7 +1012,7 @@
- exts.append(Extension('_bsddb', ['_bsddb.c'],
- depends = ['bsddb.h'],
- library_dirs=dblib_dir,
-- runtime_library_dirs=dblib_dir,
-+ runtime_library_dirs=bsddb_runtime_library_dir,
- include_dirs=db_incs,
- libraries=dblibs))
- else:
-@@ -1112,12 +1118,17 @@
- else:
- sqlite_extra_link_args = ()
-
-+ if os.environ.get('CROSS_COMPILING') == 'yes':
-+ sqlite_runtime_library_dirs = None
-+ else:
-+ sqlite_runtime_library_dirs = sqlite_libdir
-+
- exts.append(Extension('_sqlite3', sqlite_srcs,
- define_macros=sqlite_defines,
- include_dirs=["Modules/_sqlite",
- sqlite_incdir],
- library_dirs=sqlite_libdir,
-- runtime_library_dirs=sqlite_libdir,
-+ runtime_library_dirs=sqlite_runtime_library_dirs,
- extra_link_args=sqlite_extra_link_args,
- libraries=["sqlite3",]))
- else:
-@@ -1218,9 +1229,13 @@
- elif cand == "bdb":
- if db_incs is not None:
- print "building dbm using bdb"
-+ if os.environ.get('CROSS_COMPILING') == 'yes':
-+ db_runtime_library_dir = None
-+ else:
-+ db_runtime_library_dir = dblib_dir
- dbmext = Extension('dbm', ['dbmmodule.c'],
- library_dirs=dblib_dir,
-- runtime_library_dirs=dblib_dir,
-+ runtime_library_dirs=db_runtime_library_dir,
- include_dirs=db_incs,
- define_macros=[
- ('HAVE_BERKDB_H', None),
diff --git a/package/python/python-2.7-012-correct-32bit-64bit-check.patch b/package/python/python-2.7-012-correct-32bit-64bit-check.patch
deleted file mode 100644
index bfccbfd..0000000
--- a/package/python/python-2.7-012-correct-32bit-64bit-check.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-Use correct mechanism to determine 32/64 bits
-
-Python setup.py builds certain extensions (dl and imageop) only on 32
-bits architecture. However, to test whether the architecture is 32
-bits or not, it was looking at the sys.maxint value of the host Python
-interpreter... which might run on a 64 bits architecture even though
-the target is 32 bits, or which might run on a 32 bits architecture
-even though the target is 64 bits.
-
-Therefore, we introduce a is_arch_64_bits() function, which looks at
-the pyconfig.h file generated by ./configure for the value of
-SIZEOF_LONG to determine if the architecture is 32 or 64 bits.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
----
- setup.py | 12 ++++++++++--
- 1 file changed, 10 insertions(+), 2 deletions(-)
-
-Index: Python-2.7.2/setup.py
-===================================================================
---- Python-2.7.2.orig/setup.py
-+++ Python-2.7.2/setup.py
-@@ -29,6 +29,14 @@
- except KeyError:
- disabled_module_list = list()
-
-+def is_arch_64_bits():
-+ data = open('pyconfig.h').read()
-+ m = re.search(r"#s*define\s+SIZEOF_LONG\s+4\s*", data)
-+ if m is None:
-+ return True
-+ else:
-+ return False
-+
- def add_dir_to_list(dirlist, dir):
- """Add the directory 'dir' to the list 'dirlist' (at the front) if
- 1) 'dir' is not already in 'dirlist'
-@@ -628,7 +636,7 @@
- exts.append( Extension('audioop', ['audioop.c']) )
-
- # Disabled on 64-bit platforms
-- if sys.maxint != 9223372036854775807L:
-+ if not is_arch_64_bits():
- # Operations on images
- exts.append( Extension('imageop', ['imageop.c']) )
- else:
-@@ -1444,7 +1452,7 @@
- missing.append('_codecs_%s' % loc)
-
- # Dynamic loading module
-- if sys.maxint == 0x7fffffff:
-+ if not is_arch_64_bits():
- # This requires sizeof(int) == sizeof(long) == sizeof(char*)
- dl_inc = find_file('dlfcn.h', [], inc_dirs)
- if (dl_inc is not None) and (platform not in ['atheos']):
diff --git a/package/python/python-2.7-013-fix-linux-3-compilation.patch b/package/python/python-2.7-013-fix-linux-3-compilation.patch
deleted file mode 100644
index e834b9f..0000000
--- a/package/python/python-2.7-013-fix-linux-3-compilation.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Index: Python-2.7.2/configure
-===================================================================
---- Python-2.7.2.orig/configure
-+++ Python-2.7.2/configure
-@@ -3007,6 +3007,7 @@
- darwin*) MACHDEP="darwin";;
- atheos*) MACHDEP="atheos";;
- irix646) MACHDEP="irix6";;
-+ linux*) MACHDEP="linux2";;
- '') MACHDEP="unknown";;
- esac
- fi
-Index: Python-2.7.2/configure.in
-===================================================================
---- Python-2.7.2.orig/configure.in
-+++ Python-2.7.2/configure.in
-@@ -297,6 +297,7 @@
- darwin*) MACHDEP="darwin";;
- atheos*) MACHDEP="atheos";;
- irix646) MACHDEP="irix6";;
-+ linux*) MACHDEP="linux2";;
- '') MACHDEP="unknown";;
- esac
- fi
diff --git a/package/python/python-2.7-014-verbose-module-build.patch b/package/python/python-2.7-014-verbose-module-build.patch
deleted file mode 100644
index ea81e55..0000000
--- a/package/python/python-2.7-014-verbose-module-build.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Enables verbose output when building modules
-
-Patch borrowed from OpenBricks.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
-Index: Python-2.7.2/Makefile.pre.in
-===================================================================
---- Python-2.7.2.orig/Makefile.pre.in
-+++ Python-2.7.2/Makefile.pre.in
-@@ -411,7 +411,7 @@
- # 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)" CONFIG_ARGS="$(CONFIG_ARGS)" $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py -q 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 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
-
diff --git a/package/python/python-2.7-015-distutils-cross-compilation-support.patch b/package/python/python-2.7-015-distutils-cross-compilation-support.patch
deleted file mode 100644
index 7fd404e..0000000
--- a/package/python/python-2.7-015-distutils-cross-compilation-support.patch
+++ /dev/null
@@ -1,125 +0,0 @@
-Add some cross-compilation fixes to distutils
-
-Inspired by work done by Marc Kleine-Budde <mkl@pengutronix.de> in
-PTXdist.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
----
- Lib/distutils/sysconfig.py | 7 ++++---
- 1 files changed, 4 insertions(+), 3 deletions(-)
-
-Index: b/Lib/distutils/sysconfig.py
-===================================================================
---- a/Lib/distutils/sysconfig.py
-+++ b/Lib/distutils/sysconfig.py
-@@ -18,14 +18,38 @@
-
- from distutils.errors import DistutilsPlatformError
-
--# These are needed in a couple of spots, so just compute them once.
--PREFIX = os.path.normpath(sys.prefix)
--EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
-+if os.environ.get('CROSS_COMPILING') == 'yes':
-+ _sysroot=os.environ.get('_python_sysroot')
-+ PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_prefix'))
-+ EXEC_PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_exec_prefix'))
-+ # In the cross-compilation case, we have two cases:
-+ #
-+ # 1/ We're currently cross-compiling Python itself. In this case,
-+ # EXECUTABLE_DIRNAME should point to the source directory of the
-+ # target Python, so that the rest of the code, especially the
-+ # _python_build() function will properly understand that we are
-+ # building Python itself. In this case, _python_srcdir is
-+ # defined.
-+ #
-+ # 2/ We're currently cross-compiling third party Python
-+ # modules. In this case, EXECUTABLE_DIRNAME should point to where
-+ # the target python executable is installed in the sysroot, so
-+ # that the proper Makefile is going to be read. In this case,
-+ # _python_srcdir is not defined.
-+ #
-+ if os.environ.get('_python_srcdir') is not None:
-+ EXECUTABLE_DIRNAME = os.environ.get('_python_srcdir')
-+ else:
-+ EXECUTABLE_DIRNAME = os.path.join(_sysroot, "usr/bin")
-+else:
-+ PREFIX = os.path.normpath(sys.prefix)
-+ EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
-+ EXECUTABLE_DIRNAME = os.path.dirname(os.path.realpath(sys.executable))
-
- # Path to the base directory of the project. On Windows the binary may
- # live in project/PCBuild9. If we're dealing with an x64 Windows build,
- # it'll live in project/PCbuild/amd64.
--project_base = os.path.dirname(os.path.abspath(sys.executable))
-+project_base = EXECUTABLE_DIRNAME
- if os.name == "nt" and "pcbuild" in project_base[-8:].lower():
- project_base = os.path.abspath(os.path.join(project_base, os.path.pardir))
- # PC/VS7.1
-@@ -74,7 +98,7 @@
-
- if os.name == "posix":
- if python_build:
-- buildir = os.path.dirname(sys.executable)
-+ buildir = EXECUTABLE_DIRNAME
- if plat_specific:
- # python.h is located in the buildir
- inc_dir = buildir
-@@ -245,7 +269,7 @@
- def get_makefile_filename():
- """Return full pathname of installed Makefile from the Python build."""
- if python_build:
-- return os.path.join(os.path.dirname(sys.executable), "Makefile")
-+ return os.path.join(EXECUTABLE_DIRNAME, "Makefile")
- lib_dir = get_python_lib(plat_specific=1, standard_lib=1)
- return os.path.join(lib_dir, "config", "Makefile")
-
-@@ -311,6 +335,11 @@
- # `$$' is a literal `$' in make
- tmpv = v.replace('$$', '')
-
-+ # Adjust prefix and exec_prefix when we're cross compiling
-+ if os.environ.get('CROSS_COMPILING') == "yes":
-+ if n == "prefix" or n == "exec_prefix":
-+ v = _sysroot + v
-+
- if "$" in tmpv:
- notdone[n] = v
- else:
-Index: b/configure.in
-===================================================================
---- a/configure.in
-+++ b/configure.in
-@@ -4342,6 +4342,20 @@
- CROSS_COMPILING=$cross_compiling
- AC_SUBST(CROSS_COMPILING)
-
-+#
-+# Cross compiling
-+#
-+# special RUNSHARED
-+if test "$cross_compiling" = "yes"; then
-+ RUNSHARED="\
-+ CROSS_COMPILING=yes \
-+ _python_cross_host=${ac_cv_host} \
-+ _python_srcdir=\"\$(srcdir)\" \
-+ _python_prefix=\"\$(prefix)\" \
-+ _python_exec_prefix=\"\$(exec_prefix)\""
-+fi
-+
-+
- # generate output files
- AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc)
- AC_CONFIG_FILES([Modules/ld_so_aix], [chmod +x Modules/ld_so_aix])
-Index: b/Lib/distutils/command/build_ext.py
-===================================================================
---- a/Lib/distutils/command/build_ext.py
-+++ b/Lib/distutils/command/build_ext.py
-@@ -237,7 +237,7 @@
- if ((sys.platform.startswith('linux') or sys.platform.startswith('gnu')
- or sys.platform.startswith('sunos'))
- and sysconfig.get_config_var('Py_ENABLE_SHARED')):
-- if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")):
-+ if not sysconfig.python_build:
- # building third party extensions
- self.library_dirs.append(sysconfig.get_config_var('LIBDIR'))
- else:
diff --git a/package/python/python-2.7-016-cross-compile-getaddrinfo.patch b/package/python/python-2.7-016-cross-compile-getaddrinfo.patch
deleted file mode 100644
index dae3005..0000000
--- a/package/python/python-2.7-016-cross-compile-getaddrinfo.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Disable buggy_getaddrinfo configure test when cross-compiling with IPv6 support
-
-Signed-off-by: Vanya Sergeev <vsergeev@gmail.com>
-
---- python-2.7.2.orig/configure.in 2012-04-22 06:52:09.361809545 -0400
-+++ python-2.7.2/configure.in 2012-04-22 06:56:37.900634194 -0400
-@@ -3128,7 +3128,7 @@
-
- AC_MSG_RESULT($ac_cv_buggy_getaddrinfo)
-
--if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
-+if test $have_getaddrinfo = no || test "$cross_compiling" != "yes" -a "$ac_cv_buggy_getaddrinfo" = yes
- then
- if test $ipv6 = yes
- then
diff --git a/package/python/python.mk b/package/python/python.mk
index f2e48c4..0469820 100644
--- a/package/python/python.mk
+++ b/package/python/python.mk
@@ -5,16 +5,15 @@
################################################################################
PYTHON_VERSION_MAJOR = 2.7
-PYTHON_VERSION = $(PYTHON_VERSION_MAJOR).3
+PYTHON_VERSION = $(PYTHON_VERSION_MAJOR).6
PYTHON_SOURCE = Python-$(PYTHON_VERSION).tar.xz
PYTHON_SITE = http://python.org/ftp/python/$(PYTHON_VERSION)
PYTHON_LICENSE = Python software foundation license v2, others
PYTHON_LICENSE_FILES = LICENSE
-# Python needs itself and a "pgen" program to build itself, both being
-# provided in the Python sources. So in order to cross-compile Python,
-# we need to build a host Python first. This host Python is also
-# installed in $(HOST_DIR), as it is needed when cross-compiling
+# Python needs itself to be built, so in order to cross-compile
+# Python, we need to build a host Python first. This host Python is
+# also installed in $(HOST_DIR), as it is needed when cross-compiling
# third-party Python modules.
HOST_PYTHON_CONF_OPT += \
@@ -32,12 +31,8 @@ HOST_PYTHON_CONF_OPT += \
--disable-bsddb \
--disable-test-modules \
--disable-bz2 \
- --disable-ssl
-
-HOST_PYTHON_MAKE_ENV = \
- PYTHON_MODULES_INCLUDE=$(HOST_DIR)/usr/include \
- PYTHON_MODULES_LIB="$(HOST_DIR)/lib $(HOST_DIR)/usr/lib"
-
+ --disable-ssl \
+ --disable-pyo-build
# Building host python in parallel sometimes triggers a "Bus error"
# during the execution of "./python setup.py build" in the
@@ -51,12 +46,6 @@ PYTHON_DEPENDENCIES = host-python libffi
HOST_PYTHON_DEPENDENCIES = host-expat host-zlib
-define HOST_PYTHON_INSTALL_PGEN
- $(INSTALL) -m0755 -D $(@D)/Parser/pgen $(HOST_DIR)/usr/bin/python-pgen
-endef
-
-HOST_PYTHON_POST_INSTALL_HOOKS += HOST_PYTHON_INSTALL_PGEN
-
PYTHON_INSTALL_STAGING = YES
ifeq ($(BR2_PACKAGE_PYTHON_READLINE),y)
@@ -124,14 +113,9 @@ PYTHON_DEPENDENCIES += openssl
endif
PYTHON_CONF_ENV += \
- PYTHON_FOR_BUILD=$(HOST_DIR)/usr/bin/python \
- PGEN_FOR_BUILD=$(HOST_DIR)/usr/bin/python-pgen \
- ac_cv_have_long_long_format=yes
-
-PYTHON_MAKE_ENV += \
- _python_sysroot=$(STAGING_DIR) \
- PYTHON_MODULES_INCLUDE=$(STAGING_DIR)/usr/include \
- PYTHON_MODULES_LIB="$(STAGING_DIR)/lib $(STAGING_DIR)/usr/lib"
+ ac_cv_have_long_long_format=yes \
+ ac_cv_file__dev_ptmx=yes \
+ ac_cv_file__dev_ptc=yes
PYTHON_CONF_OPT += \
--without-cxx-main \
@@ -143,7 +127,18 @@ PYTHON_CONF_OPT += \
--disable-gdbm \
--disable-tk \
--disable-nis \
- --disable-dbm
+ --disable-dbm \
+ --disable-pyo-build
+
+# This is needed to make sure the Python build process doesn't try to
+# regenerate those files with the pgen program. Otherwise, it builds
+# pgen for the target, and tries to run it on the host.
+
+define PYTHON_TOUCH_GRAMMAR_FILES
+ touch $(@D)/Include/graminit.h $(@D)/Python/graminit.c
+endef
+
+PYTHON_POST_PATCH_HOOKS += PYTHON_TOUCH_GRAMMAR_FILES
#
# Remove useless files. In the config/ directory, only the Makefile
@@ -168,7 +163,7 @@ PYTHON_POST_INSTALL_TARGET_HOOKS += PYTHON_REMOVE_USELESS_FILES
PYTHON_AUTORECONF = YES
# Provided to other packages
-PYTHON_PATH = $(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages/
+PYTHON_PATH = $(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/sysconfigdata/:$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages/
$(eval $(autotools-package))
$(eval $(host-autotools-package))
--
1.8.3.2
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [Buildroot] [PATCHv1 05/26] pkg-python: simplifications after the Python 2.x bump
2014-02-13 20:48 [Buildroot] [PATCHv1 00/26] Python 2 and 3 bumps, support for Python 3 external modules Thomas Petazzoni
` (3 preceding siblings ...)
2014-02-13 20:48 ` [Buildroot] [PATCHv1 04/26] python: bump to 2.7.6 Thomas Petazzoni
@ 2014-02-13 20:48 ` Thomas Petazzoni
2014-02-14 20:59 ` Peter Korsgaard
2014-02-13 20:48 ` [Buildroot] [PATCHv1 06/26] core: remove .py/.pyc for Python Thomas Petazzoni
` (21 subsequent siblings)
26 siblings, 1 reply; 36+ messages in thread
From: Thomas Petazzoni @ 2014-02-13 20:48 UTC (permalink / raw)
To: buildroot
Thanks to the Python 2.x bump, it is no longer needed to pass
PYTHONCPREFIX, and CROSS_COMPILING when building third-party Python
modules.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/pkg-python.mk | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/package/pkg-python.mk b/package/pkg-python.mk
index b4de56d..9c8767f 100644
--- a/package/pkg-python.mk
+++ b/package/pkg-python.mk
@@ -27,7 +27,6 @@ PKG_PYTHON_DISTUTILS_ENV = \
CFLAGS="$(TARGET_CFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS)" \
LDSHARED="$(TARGET_CROSS)gcc -shared" \
- CROSS_COMPILING=yes \
PYTHONPATH="$(PYTHON_PATH)" \
_python_sysroot=$(STAGING_DIR) \
_python_prefix=/usr \
@@ -50,8 +49,6 @@ HOST_PKG_PYTHON_DISTUTILS_INSTALL_OPT = \
PKG_PYTHON_SETUPTOOLS_ENV = \
PATH="$(TARGET_PATH)" \
PYTHONPATH="$(PYTHON_PATH)" \
- PYTHONXCPREFIX="$(STAGING_DIR)/usr/" \
- CROSS_COMPILING=yes \
_python_sysroot=$(STAGING_DIR) \
_python_prefix=/usr \
_python_exec_prefix=/usr
@@ -64,8 +61,7 @@ PKG_PYTHON_SETUPTOOLS_INSTALL_OPT = \
# Host setuptools-based packages
HOST_PKG_PYTHON_SETUPTOOLS_ENV = \
- PATH="$(HOST_PATH)" \
- PYTHONXCPREFIX="$(HOST_DIR)/usr/"
+ PATH="$(HOST_PATH)"
HOST_PKG_PYTHON_SETUPTOOLS_INSTALL_OPT = \
--prefix=$(HOST_DIR)/usr
--
1.8.3.2
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [Buildroot] [PATCHv1 06/26] core: remove .py/.pyc for Python
2014-02-13 20:48 [Buildroot] [PATCHv1 00/26] Python 2 and 3 bumps, support for Python 3 external modules Thomas Petazzoni
` (4 preceding siblings ...)
2014-02-13 20:48 ` [Buildroot] [PATCHv1 05/26] pkg-python: simplifications after the Python 2.x bump Thomas Petazzoni
@ 2014-02-13 20:48 ` Thomas Petazzoni
2014-02-14 20:59 ` Peter Korsgaard
2014-02-13 20:48 ` [Buildroot] [PATCHv1 07/26] pkg-python: no longer use distutilscross for setuptools Thomas Petazzoni
` (20 subsequent siblings)
26 siblings, 1 reply; 36+ messages in thread
From: Thomas Petazzoni @ 2014-02-13 20:48 UTC (permalink / raw)
To: buildroot
The main Buildroot Makefile was removing *.py or *.pyc if Python 2 was
enabled, but for Python 3, this action was taken care of by a post
install target hook of python3.mk, which means it wouldn't work with
external modules (the .py/.pyc removal would be done before external
Python modules are installed).
We fix this by making the global *.py/*.pyc removal in the main
Makefile work for both Python 2 and Python 3.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 8226111..f7ed264 100644
--- a/Makefile
+++ b/Makefile
@@ -513,10 +513,10 @@ endif
rm -rf $(TARGET_DIR)/usr/doc $(TARGET_DIR)/usr/share/doc
rm -rf $(TARGET_DIR)/usr/share/gtk-doc
-rmdir $(TARGET_DIR)/usr/share 2>/dev/null
-ifeq ($(BR2_PACKAGE_PYTHON_PY_ONLY),y)
+ifeq ($(BR2_PACKAGE_PYTHON_PY_ONLY)$(BR2_PACKAGE_PYTHON3_PY_ONLY),y)
find $(TARGET_DIR)/usr/lib/ -name '*.pyc' -print0 | xargs -0 rm -f
endif
-ifeq ($(BR2_PACKAGE_PYTHON_PYC_ONLY),y)
+ifeq ($(BR2_PACKAGE_PYTHON_PYC_ONLY)$(BR2_PACKAGE_PYTHON3_PYC_ONLY),y)
find $(TARGET_DIR)/usr/lib/ -name '*.py' -print0 | xargs -0 rm -f
endif
rm -rf $(TARGET_DIR)/usr/lib/luarocks
--
1.8.3.2
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [Buildroot] [PATCHv1 07/26] pkg-python: no longer use distutilscross for setuptools
2014-02-13 20:48 [Buildroot] [PATCHv1 00/26] Python 2 and 3 bumps, support for Python 3 external modules Thomas Petazzoni
` (5 preceding siblings ...)
2014-02-13 20:48 ` [Buildroot] [PATCHv1 06/26] core: remove .py/.pyc for Python Thomas Petazzoni
@ 2014-02-13 20:48 ` Thomas Petazzoni
2014-02-14 21:03 ` Peter Korsgaard
2014-02-13 20:48 ` [Buildroot] [PATCHv1 08/26] python-distutilscross: remove package that is no longer needed Thomas Petazzoni
` (19 subsequent siblings)
26 siblings, 1 reply; 36+ messages in thread
From: Thomas Petazzoni @ 2014-02-13 20:48 UTC (permalink / raw)
To: buildroot
Thanks to the bump of Python 2.x, distutilscross is no longer needed
to achieve cross-compilation for setuptools packages. The host Python
2.x interpreter can be tricked into using the target compiler thanks
to pointing it to a different sysconfigdata module, which is achieved
using PYTHON_PATH.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/pkg-python.mk | 21 ++++++++-------------
1 file changed, 8 insertions(+), 13 deletions(-)
diff --git a/package/pkg-python.mk b/package/pkg-python.mk
index 9c8767f..c4bbb37 100644
--- a/package/pkg-python.mk
+++ b/package/pkg-python.mk
@@ -114,7 +114,7 @@ endif
else ifeq ($$($(2)_SETUP_TYPE),setuptools)
ifeq ($(4),target)
$(2)_BASE_ENV = $$(PKG_PYTHON_SETUPTOOLS_ENV)
-$(2)_BASE_BUILD_TGT = build -x
+$(2)_BASE_BUILD_TGT = build
$(2)_BASE_BUILD_OPT =
$(2)_BASE_INSTALL_OPT = $$(PKG_PYTHON_SETUPTOOLS_INSTALL_OPT)
else
@@ -133,13 +133,12 @@ endif
# front of the dependencies.
#
# However it must be repeated from inner-generic-package, as we need
-# to exclude the python, host-python, host-python-setuptools and
-# host-distutilscross packages, which are added below in the list of
-# dependencies depending on the package characteristics, and shouldn't
-# be derived automatically from the dependencies of the corresponding
-# target package. For example, target packages need
-# host-python-distutilscross, but not host packages.
-$(2)_DEPENDENCIES ?= $(filter-out host-python host-python-setuptools host-python-distutilscross $(1),$(patsubst host-host-%,host-%,$(addprefix host-,$($(3)_DEPENDENCIES))))
+# to exclude the python, host-python and host-python-setuptools
+# packages, which are added below in the list of dependencies
+# depending on the package characteristics, and shouldn't be derived
+# automatically from the dependencies of the corresponding target
+# package.
+$(2)_DEPENDENCIES ?= $(filter-out host-python host-python-setuptools $(1),$(patsubst host-host-%,host-%,$(addprefix host-,$($(3)_DEPENDENCIES))))
# Target packages need both the python interpreter on the target (for
# runtime) and the python interpreter on the host (for
@@ -152,17 +151,13 @@ $(2)_DEPENDENCIES += host-python
endif
# Setuptools based packages will need host-python-setuptools (both
-# host and target) and host-python-distutilscross (only target
-# packages). We need to have a special exclusion for the
+# host and target). We need to have a special exclusion for the
# host-setuptools package itself: it is setuptools-based, but
# shouldn't depend on host-setuptools (because it would otherwise
# depend on itself!).
ifeq ($$($(2)_SETUP_TYPE),setuptools)
ifneq ($(2),HOST_PYTHON_SETUPTOOLS)
$(2)_DEPENDENCIES += host-python-setuptools
-ifeq ($(4),target)
-$(2)_DEPENDENCIES += host-python-distutilscross
-endif
endif
endif
--
1.8.3.2
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [Buildroot] [PATCHv1 08/26] python-distutilscross: remove package that is no longer needed
2014-02-13 20:48 [Buildroot] [PATCHv1 00/26] Python 2 and 3 bumps, support for Python 3 external modules Thomas Petazzoni
` (6 preceding siblings ...)
2014-02-13 20:48 ` [Buildroot] [PATCHv1 07/26] pkg-python: no longer use distutilscross for setuptools Thomas Petazzoni
@ 2014-02-13 20:48 ` Thomas Petazzoni
2014-02-13 20:48 ` [Buildroot] [PATCHv1 09/26] python3: removal of *.py/*.pyc is now done globally Thomas Petazzoni
` (18 subsequent siblings)
26 siblings, 0 replies; 36+ messages in thread
From: Thomas Petazzoni @ 2014-02-13 20:48 UTC (permalink / raw)
To: buildroot
Thanks to the previous commit that makes distutilscross unecessary for
setuptools packages, the host-distutilscross package can now be
removed. There is no need for any Config.in.legacy handling, since
there is no target variant, or visible Config.in option for
host-distutilscross.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/python-distutilscross/python-distutilscross.mk | 12 ------------
1 file changed, 12 deletions(-)
delete mode 100644 package/python-distutilscross/python-distutilscross.mk
diff --git a/package/python-distutilscross/python-distutilscross.mk b/package/python-distutilscross/python-distutilscross.mk
deleted file mode 100644
index cfe2811..0000000
--- a/package/python-distutilscross/python-distutilscross.mk
+++ /dev/null
@@ -1,12 +0,0 @@
-################################################################################
-#
-# python-distutilscross
-#
-################################################################################
-
-PYTHON_DISTUTILSCROSS_VERSION = 0.1
-PYTHON_DISTUTILSCROSS_SOURCE = distutilscross-$(PYTHON_DISTUTILSCROSS_VERSION).tar.gz
-PYTHON_DISTUTILSCROSS_SITE = http://pypi.python.org/packages/source/d/distutilscross
-PYTHON_DISTUTILSCROSS_SETUP_TYPE = setuptools
-
-$(eval $(host-python-package))
--
1.8.3.2
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [Buildroot] [PATCHv1 09/26] python3: removal of *.py/*.pyc is now done globally
2014-02-13 20:48 [Buildroot] [PATCHv1 00/26] Python 2 and 3 bumps, support for Python 3 external modules Thomas Petazzoni
` (7 preceding siblings ...)
2014-02-13 20:48 ` [Buildroot] [PATCHv1 08/26] python-distutilscross: remove package that is no longer needed Thomas Petazzoni
@ 2014-02-13 20:48 ` Thomas Petazzoni
2014-02-13 20:48 ` [Buildroot] [PATCHv1 10/26] python3: make it exclusive from python Thomas Petazzoni
` (17 subsequent siblings)
26 siblings, 0 replies; 36+ messages in thread
From: Thomas Petazzoni @ 2014-02-13 20:48 UTC (permalink / raw)
To: buildroot
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/python3/python3.mk | 21 ---------------------
1 file changed, 21 deletions(-)
diff --git a/package/python3/python3.mk b/package/python3/python3.mk
index b5e9689..d49fe48 100644
--- a/package/python3/python3.mk
+++ b/package/python3/python3.mk
@@ -159,26 +159,5 @@ ifneq ($(BR2_PACKAGE_PYTHON),y)
PYTHON3_POST_INSTALL_TARGET_HOOKS += PYTHON3_INSTALL_SYMLINK
endif
-ifeq ($(BR2_PACKAGE_PYTHON3_PY_ONLY),y)
-define PYTHON3_REMOVE_MODULES_FILES
- for i in `find $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR) \
- -name __pycache__` ; do \
- rm -rf $$i ; \
- done
-endef
-endif
-
-ifeq ($(BR2_PACKAGE_PYTHON3_PYC_ONLY),y)
-define PYTHON3_REMOVE_MODULES_FILES
- for i in `find $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR) \
- -name *.py` ; do \
- rm -f $$i ; \
- done
-endef
-endif
-
-PYTHON3_POST_INSTALL_TARGET_HOOKS += PYTHON3_REMOVE_MODULES_FILES
-
-
$(eval $(autotools-package))
$(eval $(host-autotools-package))
--
1.8.3.2
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [Buildroot] [PATCHv1 10/26] python3: make it exclusive from python
2014-02-13 20:48 [Buildroot] [PATCHv1 00/26] Python 2 and 3 bumps, support for Python 3 external modules Thomas Petazzoni
` (8 preceding siblings ...)
2014-02-13 20:48 ` [Buildroot] [PATCHv1 09/26] python3: removal of *.py/*.pyc is now done globally Thomas Petazzoni
@ 2014-02-13 20:48 ` Thomas Petazzoni
2014-02-13 20:49 ` [Buildroot] [PATCHv1 11/26] python3: add python -> python3 symlink for the host variant Thomas Petazzoni
` (16 subsequent siblings)
26 siblings, 0 replies; 36+ messages in thread
From: Thomas Petazzoni @ 2014-02-13 20:48 UTC (permalink / raw)
To: buildroot
In Buildroot, we do not support installing both Python 2.x and Python
3.x on the target.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/python3/Config.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/package/python3/Config.in b/package/python3/Config.in
index 6580cfd..12928f6 100644
--- a/package/python3/Config.in
+++ b/package/python3/Config.in
@@ -1,5 +1,6 @@
config BR2_PACKAGE_PYTHON3
bool "python3"
+ depends on !BR2_PACKAGE_PYTHON
depends on BR2_USE_WCHAR
# uses fork()
depends on BR2_USE_MMU
--
1.8.3.2
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [Buildroot] [PATCHv1 11/26] python3: add python -> python3 symlink for the host variant
2014-02-13 20:48 [Buildroot] [PATCHv1 00/26] Python 2 and 3 bumps, support for Python 3 external modules Thomas Petazzoni
` (9 preceding siblings ...)
2014-02-13 20:48 ` [Buildroot] [PATCHv1 10/26] python3: make it exclusive from python Thomas Petazzoni
@ 2014-02-13 20:49 ` Thomas Petazzoni
2014-02-13 20:49 ` [Buildroot] [PATCHv1 12/26] python3: add config directory symbolic link Thomas Petazzoni
` (15 subsequent siblings)
26 siblings, 0 replies; 36+ messages in thread
From: Thomas Petazzoni @ 2014-02-13 20:49 UTC (permalink / raw)
To: buildroot
The target python3 depends on host-python3, but most of the scripts
call "python", so we need to ensure that $(HOST_DIR)/usr/bin/python
exists. This patch achieves this by creating a python -> python3
symbolic link in $(HOST_DIR), just like we are already doing for the
target Python 3.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/python3/python3.mk | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/package/python3/python3.mk b/package/python3/python3.mk
index d49fe48..ba72e75 100644
--- a/package/python3/python3.mk
+++ b/package/python3/python3.mk
@@ -159,5 +159,11 @@ ifneq ($(BR2_PACKAGE_PYTHON),y)
PYTHON3_POST_INSTALL_TARGET_HOOKS += PYTHON3_INSTALL_SYMLINK
endif
+define HOST_PYTHON3_INSTALL_SYMLINK
+ ln -fs python3 $(HOST_DIR)/usr/bin/python
+endef
+
+HOST_PYTHON3_POST_INSTALL_HOOKS += HOST_PYTHON3_INSTALL_SYMLINK
+
$(eval $(autotools-package))
$(eval $(host-autotools-package))
--
1.8.3.2
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [Buildroot] [PATCHv1 12/26] python3: add config directory symbolic link
2014-02-13 20:48 [Buildroot] [PATCHv1 00/26] Python 2 and 3 bumps, support for Python 3 external modules Thomas Petazzoni
` (10 preceding siblings ...)
2014-02-13 20:49 ` [Buildroot] [PATCHv1 11/26] python3: add python -> python3 symlink for the host variant Thomas Petazzoni
@ 2014-02-13 20:49 ` Thomas Petazzoni
2014-02-13 21:54 ` Samuel Martin
2014-02-13 20:49 ` [Buildroot] [PATCHv1 13/26] python3: use proper PYTHON3_VERSION_MAJOR instead of harcoding 3.3 Thomas Petazzoni
` (14 subsequent siblings)
26 siblings, 1 reply; 36+ messages in thread
From: Thomas Petazzoni @ 2014-02-13 20:49 UTC (permalink / raw)
To: buildroot
From: "kpa_info@yahoo.fr" <kpa_info@yahoo.fr>
When using host python to install an external module, the setup tool
look for some files in python3.3/config/. The python3 package config
directory is called config-3.3m. This is why we need to alias config
to config-3.3m.
[Thomas: use PYTHON3_VERSION_MAJOR instead of hardcoding 3.3, update
commit title.]
Signed-off-by: Patrick Gerber <kpa_info@yahoo.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/python3/python3.mk | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/package/python3/python3.mk b/package/python3/python3.mk
index ba72e75..d98ca38 100644
--- a/package/python3/python3.mk
+++ b/package/python3/python3.mk
@@ -163,7 +163,16 @@ define HOST_PYTHON3_INSTALL_SYMLINK
ln -fs python3 $(HOST_DIR)/usr/bin/python
endef
-HOST_PYTHON3_POST_INSTALL_HOOKS += HOST_PYTHON3_INSTALL_SYMLINK
+# Alias the python<version>/config-<version>m to python<version>/config
+# This is needed when installing an external python module, because
+# the setup is looking for files in python<version>/config/
+define HOST_PYTHON3_INSTALL_CONFIG_SYMLINK
+ ln -fs config-$(PYTHON3_VERSION_MAJOR)m $(HOST_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOE)config
+endef
+
+HOST_PYTHON3_POST_INSTALL_HOOKS += \
+ HOST_PYTHON3_INSTALL_SYMLINK \
+ HOST_PYTHON3_INSTALL_CONFIG_SYMLINK
$(eval $(autotools-package))
$(eval $(host-autotools-package))
--
1.8.3.2
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [Buildroot] [PATCHv1 13/26] python3: use proper PYTHON3_VERSION_MAJOR instead of harcoding 3.3
2014-02-13 20:48 [Buildroot] [PATCHv1 00/26] Python 2 and 3 bumps, support for Python 3 external modules Thomas Petazzoni
` (11 preceding siblings ...)
2014-02-13 20:49 ` [Buildroot] [PATCHv1 12/26] python3: add config directory symbolic link Thomas Petazzoni
@ 2014-02-13 20:49 ` Thomas Petazzoni
2014-02-13 20:49 ` [Buildroot] [PATCHv1 14/26] python3: bump to 3.4.0rc1 Thomas Petazzoni
` (13 subsequent siblings)
26 siblings, 0 replies; 36+ messages in thread
From: Thomas Petazzoni @ 2014-02-13 20:49 UTC (permalink / raw)
To: buildroot
Some parts of python3.mk were hardcoding the 3.3 version as the major
version, which does not work for Python 3.4 and other future
versions. Instead, use the existing PYTHON3_VERSION_MAJOR.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/python3/python3.mk | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/package/python3/python3.mk b/package/python3/python3.mk
index d98ca38..477bdfb 100644
--- a/package/python3/python3.mk
+++ b/package/python3/python3.mk
@@ -127,7 +127,7 @@ PYTHON3_MAKE_ENV = \
# trouble for cross compilation
define PYTHON3_FIXUP_LIBDIR
$(SED) 's|^LIBDIR=.*|LIBDIR= $(STAGING_DIR)/usr/lib|' \
- $(STAGING_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/config-3.3m/Makefile
+ $(STAGING_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/config-$(PYTHON3_VERSION_MAJOR)m/Makefile
endef
PYTHON3_POST_INSTALL_STAGING_HOOKS += PYTHON3_FIXUP_LIBDIR
@@ -141,7 +141,7 @@ define PYTHON3_REMOVE_USELESS_FILES
rm -f $(TARGET_DIR)/usr/bin/python$(PYTHON3_VERSION_MAJOR)m-config
rm -f $(TARGET_DIR)/usr/bin/python3-config
rm -f $(TARGET_DIR)/usr/bin/smtpd.py.3
- for i in `find $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/config-3.3m/ \
+ for i in `find $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/config-$(PYTHON3_VERSION_MAJOR)m/ \
-type f -not -name pyconfig.h -a -not -name Makefile` ; do \
rm -f $$i ; \
done
--
1.8.3.2
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [Buildroot] [PATCHv1 14/26] python3: bump to 3.4.0rc1
2014-02-13 20:48 [Buildroot] [PATCHv1 00/26] Python 2 and 3 bumps, support for Python 3 external modules Thomas Petazzoni
` (12 preceding siblings ...)
2014-02-13 20:49 ` [Buildroot] [PATCHv1 13/26] python3: use proper PYTHON3_VERSION_MAJOR instead of harcoding 3.3 Thomas Petazzoni
@ 2014-02-13 20:49 ` Thomas Petazzoni
2014-02-13 20:49 ` [Buildroot] [PATCHv1 15/26] python3: provide a PYTHON3_PATH Thomas Petazzoni
` (12 subsequent siblings)
26 siblings, 0 replies; 36+ messages in thread
From: Thomas Petazzoni @ 2014-02-13 20:49 UTC (permalink / raw)
To: buildroot
This commit bumps the Python3 package to use Python 3.4.0rc1.
About the patches:
* The patches below 100 are significantly changed, because like for
Python 2.x, a good number of improvements have been made in the
upstream Python for cross-compilation. Therefore, almost all of
these patches have been modified.
* All the patches above 100 are simply updated for Python 3.4.0, with
a small refactoring for the handling of test modules.
The details of the python3.mk changes are:
* --without-ensurepip to tell Python to not use PIP and build time.
* Many environment variables are no longer passed, they were specific
to our cross-compilation patches
* The fixup of the LIBDIR in the Python Makefile is no longer needed
since Python has switched to _sysconfigdata.py for distutils
configuration instead of parsing the Makefile.
* A new post patch hooks touches the two files generated by pgen to
make sure they are newer than the pgen sources, which ensures pgen
is not built/executed.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
...ython3-000-generate-sysconfigdata-buildir.patch | 158 ---------------------
| 36 +++++
.../python3/python3-001-support-for-build.patch | 68 ---------
| 72 ----------
...thon3-002-properly-detect-if-python-build.patch | 23 +++
| 41 ------
...ython3-003-sysconfigdata-install-location.patch | 76 ++++++++++
...ython3-004-no-import-when-cross-compiling.patch | 27 ----
...he.patch => python3-004-old-stdlib-cache.patch} | 39 +++--
.../python3-005-do-not-generate-pyo-files.patch | 40 ------
.../python3/python3-005-pyc-pyo-conditional.patch | 60 ++++++++
...=> python3-006-cross-compile-getaddrinfo.patch} | 8 +-
.../python3/python3-006-reread-environment.patch | 63 --------
.../python3-007-change-pyconfig-h-location.patch | 76 ----------
....patch => python3-007-disable-extensions.patch} | 44 +++---
...008-distutils-sysconfig-use-sysconfigdata.patch | 58 ++++++++
package/python3/python3-008-no-rpath.patch | 51 -------
.../python3-009-distutils-use-python-sysroot.patch | 57 ++++++++
.../python3/python3-009-verbose-module-build.patch | 26 ----
...3-010-distutils-cross-compilation-support.patch | 71 ---------
.../python3/python3-010-no-termcap-host-path.patch | 22 +++
.../python3-100-optional-test-modules.patch | 60 ++++----
package/python3/python3-101-optional-pydoc.patch | 46 +++---
package/python3/python3-102-optional-2to3.patch | 68 +++++----
package/python3/python3-103-optional-sqlite.patch | 53 ++++---
package/python3/python3-104-optional-tk.patch | 51 ++++---
package/python3/python3-105-optional-curses.patch | 30 ++--
package/python3/python3-106-optional-expat.patch | 36 ++---
.../python3/python3-107-optional-codecs-cjk.patch | 8 +-
package/python3/python3-108-optional-nis.patch | 8 +-
.../python3/python3-109-optional-unicodedata.patch | 8 +-
package/python3/python3-110-optional-idle.patch | 39 +++--
package/python3/python3.mk | 62 +++-----
33 files changed, 610 insertions(+), 975 deletions(-)
delete mode 100644 package/python3/python3-000-generate-sysconfigdata-buildir.patch
create mode 100644 package/python3/python3-001-remove-host-header-path.patch
delete mode 100644 package/python3/python3-001-support-for-build.patch
delete mode 100644 package/python3/python3-002-no-host-headers-libs.patch
create mode 100644 package/python3/python3-002-properly-detect-if-python-build.patch
delete mode 100644 package/python3/python3-003-staging-header-libs.patch
create mode 100644 package/python3/python3-003-sysconfigdata-install-location.patch
delete mode 100644 package/python3/python3-004-no-import-when-cross-compiling.patch
rename package/python3/{python3-112-old-stdlib-cache.patch => python3-004-old-stdlib-cache.patch} (61%)
delete mode 100644 package/python3/python3-005-do-not-generate-pyo-files.patch
create mode 100644 package/python3/python3-005-pyc-pyo-conditional.patch
rename package/python3/{python3-011-cross-compile-getaddrinfo.patch => python3-006-cross-compile-getaddrinfo.patch} (81%)
delete mode 100644 package/python3/python3-006-reread-environment.patch
delete mode 100644 package/python3/python3-007-change-pyconfig-h-location.patch
rename package/python3/{python3-012-disable-extensions.patch => python3-007-disable-extensions.patch} (78%)
create mode 100644 package/python3/python3-008-distutils-sysconfig-use-sysconfigdata.patch
delete mode 100644 package/python3/python3-008-no-rpath.patch
create mode 100644 package/python3/python3-009-distutils-use-python-sysroot.patch
delete mode 100644 package/python3/python3-009-verbose-module-build.patch
delete mode 100644 package/python3/python3-010-distutils-cross-compilation-support.patch
create mode 100644 package/python3/python3-010-no-termcap-host-path.patch
diff --git a/package/python3/python3-000-generate-sysconfigdata-buildir.patch b/package/python3/python3-000-generate-sysconfigdata-buildir.patch
deleted file mode 100644
index a29aa0f..0000000
--- a/package/python3/python3-000-generate-sysconfigdata-buildir.patch
+++ /dev/null
@@ -1,158 +0,0 @@
-changeset: 79745:f85c3f4d9b98
-parent: 79743:36b2ca7dc893
-parent: 79744:24d52d3060e8
-user: Trent Nelson <trent@trent.me>
-date: Tue Oct 16 08:17:11 2012 -0400
-summary: Merge issue #15298: ensure _sysconfigdata is generated in build directory,
-
-Taken from upstream.
-
----
- Lib/sysconfig.py | 11 ++++++++++-
- Makefile.pre.in | 24 +++++++++++++-----------
- setup.py | 14 --------------
- 3 files changed, 23 insertions(+), 26 deletions(-)
-
-Index: Python-3.3.0/Lib/sysconfig.py
-===================================================================
---- Python-3.3.0.orig/Lib/sysconfig.py
-+++ Python-3.3.0/Lib/sysconfig.py
-@@ -390,13 +390,22 @@
- if _PYTHON_BUILD:
- vars['LDSHARED'] = vars['BLDSHARED']
-
-- destfile = os.path.join(os.path.dirname(__file__), '_sysconfigdata.py')
-+ pybuilddir = 'build/lib.%s-%s' % (get_platform(), sys.version[:3])
-+ if hasattr(sys, "gettotalrefcount"):
-+ pybuilddir += '-pydebug'
-+ os.makedirs(pybuilddir, exist_ok=True)
-+ destfile = os.path.join(pybuilddir, '_sysconfigdata.py')
-+
- with open(destfile, 'w', encoding='utf8') as f:
- f.write('# system configuration generated and used by'
- ' the sysconfig module\n')
- f.write('build_time_vars = ')
- pprint.pprint(vars, stream=f)
-
-+ # Create file used for sys.path fixup -- see Modules/getpath.c
-+ with open('pybuilddir.txt', 'w', encoding='ascii') as f:
-+ f.write(pybuilddir)
-+
- def _init_posix(vars):
- """Initialize the module as appropriate for POSIX systems."""
- # _sysconfigdata is generated at build time, see _generate_posix_vars()
-Index: Python-3.3.0/Makefile.pre.in
-===================================================================
---- Python-3.3.0.orig/Makefile.pre.in
-+++ Python-3.3.0/Makefile.pre.in
-@@ -410,8 +410,6 @@
- Objects/unicodectype.o \
- Objects/weakrefobject.o
-
--SYSCONFIGDATA=$(srcdir)/Lib/_sysconfigdata.py
--
- ##########################################################################
- # objects that get linked into the Python library
- LIBRARY_OBJS_OMIT_FROZEN= \
-@@ -432,7 +430,7 @@
-
- # Default target
- all: build_all
--build_all: $(BUILDPYTHON) $(SYSCONFIGDATA) oldsharedmods sharedmods gdbhooks Modules/_testembed
-+build_all: $(BUILDPYTHON) oldsharedmods sharedmods gdbhooks Modules/_testembed
-
- # Compile a binary with gcc profile guided optimization.
- profile-opt:
-@@ -466,15 +464,17 @@
- $(BUILDPYTHON): Modules/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY)
- $(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) -o $@ Modules/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
-
--platform: $(BUILDPYTHON) $(SYSCONFIGDATA)
-+platform: $(BUILDPYTHON)
- $(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print(get_platform()+"-"+sys.version[0:3])' >platform
-
--# Generate the sysconfig build-time data
--$(SYSCONFIGDATA): $(BUILDPYTHON)
-+# Create build directory and generate the sysconfig build-time data there.
-+# pybuilddir.txt contains the name of the build dir and is used for
-+# sys.path fixup -- see Modules/getpath.c.
-+pybuilddir.txt: $(BUILDPYTHON)
- $(RUNSHARED) $(PYTHON_FOR_BUILD) -S -m sysconfig --generate-posix-vars
-
- # Build the shared modules
--sharedmods: $(BUILDPYTHON) $(SYSCONFIGDATA)
-+sharedmods: $(BUILDPYTHON) pybuilddir.txt
- case $$MAKEFLAGS in *s*) quiet=-q; esac; \
- $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \
- $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build
-@@ -1036,7 +1036,7 @@
- else true; \
- fi; \
- done
-- @for i in $(srcdir)/Lib/*.py ; \
-+ @for i in $(srcdir)/Lib/*.py `cat pybuilddir.txt`/_sysconfigdata.py; \
- do \
- if test -x $$i; then \
- $(INSTALL_SCRIPT) $$i $(DESTDIR)$(LIBDEST); \
-@@ -1196,6 +1196,8 @@
- --install-scripts=$(BINDIR) \
- --install-platlib=$(DESTSHARED) \
- --root=$(DESTDIR)/
-+ -rm $(DESTDIR)$(DESTSHARED)/_sysconfigdata.py
-+ -rm -r $(DESTDIR)$(DESTSHARED)/__pycache__
-
- # Here are a couple of targets for MacOSX again, to install a full
- # framework-based Python. frameworkinstall installs everything, the
-@@ -1341,9 +1343,10 @@
- find . -name '*.s[ol]' -exec rm -f {} ';'
- find . -name '*.so.[0-9]*.[0-9]*' -exec rm -f {} ';'
- find build -name 'fficonfig.h' -exec rm -f {} ';' || true
-- find build -name 'fficonfig.py' -exec rm -f {} ';' || true
-+ find build -name '*.py' -exec rm -f {} ';' || true
-+ find build -name '*.py[co]' -exec rm -f {} ';' || true
-+ -rm -f pybuilddir.txt
- -rm -f Lib/lib2to3/*Grammar*.pickle
-- -rm -f $(SYSCONFIGDATA)
- -rm -f Modules/_testembed Modules/_freeze_importlib
-
- profile-removal:
-@@ -1367,7 +1370,6 @@
- Modules/Setup Modules/Setup.local Modules/Setup.config \
- Modules/ld_so_aix Modules/python.exp Misc/python.pc
- -rm -f python*-gdb.py
-- -rm -f pybuilddir.txt
- find $(srcdir) '(' -name '*.fdc' -o -name '*~' \
- -o -name '[@,#]*' -o -name '*.old' \
- -o -name '*.orig' -o -name '*.rej' \
-Index: Python-3.3.0/setup.py
-===================================================================
---- Python-3.3.0.orig/setup.py
-+++ Python-3.3.0/setup.py
-@@ -33,10 +33,6 @@
- # This global variable is used to hold the list of modules to be disabled.
- disabled_module_list = []
-
--# File which contains the directory for shared mods (for sys.path fixup
--# when running from the build dir, see Modules/getpath.c)
--_BUILDDIR_COOKIE = "pybuilddir.txt"
--
- def add_dir_to_list(dirlist, dir):
- """Add the directory 'dir' to the list 'dirlist' (after any relative
- directories) if:
-@@ -252,16 +248,6 @@
- args['compiler_so'] = compiler + ' ' + ccshared + ' ' + cflags
- self.compiler.set_executables(**args)
-
-- # Not only do we write the builddir cookie, but we manually install
-- # the shared modules directory if it isn't already in sys.path.
-- # Otherwise trying to import the extensions after building them
-- # will fail.
-- with open(_BUILDDIR_COOKIE, "wb") as f:
-- f.write(self.build_lib.encode('utf-8', 'surrogateescape'))
-- abs_build_lib = os.path.join(os.getcwd(), self.build_lib)
-- if abs_build_lib not in sys.path:
-- sys.path.append(abs_build_lib)
--
- build_ext.build_extensions(self)
-
- longest = max([len(e.name) for e in self.extensions])
--git a/package/python3/python3-001-remove-host-header-path.patch b/package/python3/python3-001-remove-host-header-path.patch
new file mode 100644
index 0000000..e159e86
--- /dev/null
+++ b/package/python3/python3-001-remove-host-header-path.patch
@@ -0,0 +1,36 @@
+setup.py: do not add invalid header locations
+
+This piece of code incorrectly adds /usr/include to
+self.compiler.include_dirs, and results in the following invalid
+compilation line:
+
+/home/thomas/projets/buildroot/output/host/usr/bin/arm-none-linux-gnueabi-gcc
+ -fPIC -Wno-unused-result -Werror=declaration-after-statement -DNDEBUG -g
+ -O3 -Wall -Wstrict-prototypes -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
+ -D_FILE_OFFSET_BITS=64 -pipe -Os
+ -I./Include -I/usr/include -I. -IInclude
+ -I/home/thomas/projets/buildroot/output/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/include
+ -I/home/thomas/projets/buildroot/output/build/python3-3.4.0b1/Include
+ -I/home/thomas/projets/buildroot/output/build/python3-3.4.0b1
+ -c /home/thomas/projets/buildroot/output/build/python3-3.4.0b1/Modules/_struct.c
+ -o build/temp.linux-arm-3.4/home/thomas/projets/buildroot/output/build/python3-3.4.0b1/Modules/_struct.o
+cc1: warning: include location "/usr/include" is unsafe for cross-compilation [-Wpoison-system-directories]
+
+The -I/usr/include is wrong when cross compiling, so we disable adding
+INCLUDEDIR and LIBDIR from the host when cross compiling.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Index: b/setup.py
+===================================================================
+--- a/setup.py
++++ b/setup.py
+@@ -487,7 +487,8 @@
+ add_dir_to_list(dir_list, directory)
+
+ if os.path.normpath(sys.base_prefix) != '/usr' \
+- and not sysconfig.get_config_var('PYTHONFRAMEWORK'):
++ and not sysconfig.get_config_var('PYTHONFRAMEWORK') \
++ and not cross_compiling:
+ # 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
diff --git a/package/python3/python3-001-support-for-build.patch b/package/python3/python3-001-support-for-build.patch
deleted file mode 100644
index 8c57cfb..0000000
--- a/package/python3/python3-001-support-for-build.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-Add support in Python build system to specify host pgen
-
-Python needs a "pgen" program to build itself. Unfortunately, the
-Python build system assumes that it can use the pgen program it has
-just built to build itself. Obviously, this cannot work in
-cross-compilation mode since the pgen program have been built for the
-target.
-
-Therefore, this patch adds support in the Python build system for the
-new PGEN_FOR_BUILD variable, so that we can point Python ./configure
-script to the pgen program that have been previously built for the
-host.
-
-Patch ported to python2.7 by Maxime Ripard <ripard@archos.com>, and
-later significantly reworked by Thomas Petazzoni
-<thomas.petazzoni@free-electrons.com>, with some inspiration taken
-from the Python patches of the PTXdist project, and then ported to
-python3.3 by Maxime Ripard <maxime.ripard@free-electrons.com>
-
-Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
----
- Makefile.pre.in | 5 +++--
- configure.ac | 5 +++++
- 2 files changed, 8 insertions(+), 2 deletions(-)
-
-Index: Python-3.3.0/Makefile.pre.in
-===================================================================
---- Python-3.3.0.orig/Makefile.pre.in
-+++ Python-3.3.0/Makefile.pre.in
-@@ -239,6 +239,7 @@
- ##########################################################################
- # Parser
- PGEN= Parser/pgen$(EXE)
-+PGEN_FOR_BUILD=@PGEN_FOR_BUILD@
-
- PSRCS= \
- Parser/acceler.c \
-@@ -639,8 +640,8 @@
-
- $(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGENSRCS)
- @$(MKDIR_P) Include
-- $(MAKE) $(PGEN)
-- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
-+ $(MAKE) $(PGEN_FOR_BUILD)
-+ $(PGEN_FOR_BUILD) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
- $(GRAMMAR_C): $(GRAMMAR_H) $(GRAMMAR_INPUT) $(PGENSRCS)
- $(MAKE) $(GRAMMAR_H)
- touch $(GRAMMAR_C)
-Index: Python-3.3.0/configure.ac
-===================================================================
---- Python-3.3.0.orig/configure.ac
-+++ Python-3.3.0/configure.ac
-@@ -51,10 +51,15 @@
- AC_MSG_RESULT($interp)
- PYTHON_FOR_BUILD="_PYTHON_PROJECT_BASE=$srcdir"' _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(srcdir)/Lib:$(srcdir)/Lib/plat-$(MACHDEP) '$interp
- fi
-+ AC_MSG_CHECKING(pgen for build)
-+ PGEN_FOR_BUILD="${PGEN_FOR_BUILD}"
-+ AC_MSG_RESULT($PGEN_FOR_BUILD)
- else
- PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
-+ PGEN_FOR_BUILD='./$(PGEN)'
- fi
- AC_SUBST(PYTHON_FOR_BUILD)
-+AC_SUBST(PGEN_FOR_BUILD)
-
- dnl Ensure that if prefix is specified, it does not end in a slash. If
- dnl it does, we get path names containing '//' which is both ugly and
diff --git a/package/python3/python3-002-no-host-headers-libs.patch b/package/python3/python3-002-no-host-headers-libs.patch
deleted file mode 100644
index 9783f28..0000000
--- a/package/python3/python3-002-no-host-headers-libs.patch
+++ /dev/null
@@ -1,72 +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.
-
-Patch first written by Thomas Petazzoni
-<thomas.petazzoni@free-electrons.com> for python2.7, and then ported
-to python3.3 by Maxime Ripard <maxime.ripard@free-electrons.com>
-
-Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
----
- setup.py | 23 +++++------------------
- 1 file changed, 5 insertions(+), 18 deletions(-)
-
-Index: Python-3.3.0/setup.py
-===================================================================
---- Python-3.3.0.orig/setup.py
-+++ Python-3.3.0/setup.py
-@@ -447,10 +447,8 @@
- if not cross_compiling:
- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
-- # only change this for cross builds for 3.3, issues on Mageia
-- if cross_compiling:
- self.add_gcc_paths()
-- self.add_multiarch_paths()
-+ self.add_multiarch_paths()
-
- # Add paths specified in the environment variables LDFLAGS and
- # CPPFLAGS for header and library files.
-@@ -458,10 +456,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
-@@ -486,17 +481,6 @@
- for directory in reversed(options.dirs):
- add_dir_to_list(dir_list, directory)
-
-- if os.path.normpath(sys.base_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"))
--
- # 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.
-@@ -506,6 +490,9 @@
- '/lib', '/usr/lib',
- ]
- inc_dirs = self.compiler.include_dirs + ['/usr/include']
-+ else:
-+ lib_dirs = self.compiler.library_dirs
-+ inc_dirs = self.compiler.include_dirs
- exts = []
- missing = []
-
diff --git a/package/python3/python3-002-properly-detect-if-python-build.patch b/package/python3/python3-002-properly-detect-if-python-build.patch
new file mode 100644
index 0000000..ce874c6
--- /dev/null
+++ b/package/python3/python3-002-properly-detect-if-python-build.patch
@@ -0,0 +1,23 @@
+distutils: fix build_ext check to find whether we're building Python or not
+
+The build_ext logic uses
+sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")) to
+determine whether we're building a third-party Python extension, or a
+built-in Python extension. However, this check is wrong in
+cross-compilation mode, and instead, the sysconfig.python_build
+variable should be used.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Index: b/Lib/distutils/command/build_ext.py
+===================================================================
+--- a/Lib/distutils/command/build_ext.py
++++ b/Lib/distutils/command/build_ext.py
+@@ -246,7 +246,7 @@
+ # Python's library directory must be appended to library_dirs
+ # See Issues: #1600860, #4366
+ if (sysconfig.get_config_var('Py_ENABLE_SHARED')):
+- if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")):
++ if not sysconfig.python_build:
+ # building third party extensions
+ self.library_dirs.append(sysconfig.get_config_var('LIBDIR'))
+ else:
diff --git a/package/python3/python3-003-staging-header-libs.patch b/package/python3/python3-003-staging-header-libs.patch
deleted file mode 100644
index b0efe29..0000000
--- a/package/python3/python3-003-staging-header-libs.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-Tell setup.py the location of headers/libraries
-
-Allow the libraries detection routine to look for headers and libs in
-other directories than /usr/include or /usr/lib through the
-environment variables PYTHON_MODULES_INCLUDE and PYTHON_MODULES_LIB.
-
-We can then use it to look for libraries in the buildroot staging
-directory.
-
-Ported to python3.3 by Maxime Ripard <maxime.ripard@free-electrons.com> based
-on the work by Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
-Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
----
- setup.py | 13 +++++++++++++
- 1 file changed, 13 insertions(+)
-
-Index: Python-3.3.0/setup.py
-===================================================================
---- Python-3.3.0.orig/setup.py
-+++ Python-3.3.0/setup.py
-@@ -441,6 +441,19 @@
- os.unlink(tmpfile)
-
- def detect_modules(self):
-+ try:
-+ modules_include_dirs = os.environ["PYTHON_MODULES_INCLUDE"].split()
-+ except KeyError:
-+ modules_include_dirs = ['/usr/include']
-+ try:
-+ modules_lib_dirs = os.environ["PYTHON_MODULES_LIB"].split()
-+ except KeyError:
-+ modules_lib_dirs = ['/usr/lib']
-+ for dir in modules_include_dirs:
-+ add_dir_to_list(self.compiler.include_dirs, dir)
-+ for dir in modules_lib_dirs:
-+ add_dir_to_list(self.compiler.library_dirs, dir)
-+
- # Ensure that /usr/local is always used, but the local build
- # directories (i.e. '.' and 'Include') must be first. See issue
- # 10520.
diff --git a/package/python3/python3-003-sysconfigdata-install-location.patch b/package/python3/python3-003-sysconfigdata-install-location.patch
new file mode 100644
index 0000000..af796d4
--- /dev/null
+++ b/package/python3/python3-003-sysconfigdata-install-location.patch
@@ -0,0 +1,76 @@
+Change the install location of _sysconfigdata.py
+
+The _sysconfigdata.py module contains definitions that are needed when
+building Python modules. In cross-compilation mode, when building
+Python extensions for the target, we need to use the _sysconfigdata.py
+of the target Python while executing the host Python.
+
+However until now, the _sysconfigdata.py module was installed in
+build/lib.<arch>-<version> directory, together with a number of
+architecture-specific shared objects, which cannot be used with the
+host Python.
+
+To solve this problem, this patch moves _sysconfigdata.py to a
+separate location, build/sysconfigdata.<arch>-<version>/, and only
+this directory gets added to the PYTHONPATH of the host Python
+interpreter when building Python modules for the target.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+Index: b/Makefile.pre.in
+===================================================================
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -543,6 +543,9 @@
+ # sys.path fixup -- see Modules/getpath.c.
+ pybuilddir.txt: $(BUILDPYTHON)
+ $(RUNSHARED) $(PYTHON_FOR_BUILD) -S -m sysconfig --generate-posix-vars
++ echo `cat pybuilddir.txt`/sysconfigdata > pysysconfigdatadir.txt
++ mkdir -p `cat pysysconfigdatadir.txt`
++ cp `cat pybuilddir.txt`/_sysconfigdata.py `cat pysysconfigdatadir.txt`
+
+ # Build the shared modules
+ # Under GNU make, MAKEFLAGS are sorted and normalized; the 's' for
+@@ -1181,7 +1184,7 @@
+ else true; \
+ fi; \
+ done
+- @for i in $(srcdir)/Lib/*.py `cat pybuilddir.txt`/_sysconfigdata.py; \
++ @for i in $(srcdir)/Lib/*.py ; \
+ do \
+ if test -x $$i; then \
+ $(INSTALL_SCRIPT) $$i $(DESTDIR)$(LIBDEST); \
+@@ -1191,6 +1194,11 @@
+ echo $(INSTALL_DATA) $$i $(LIBDEST); \
+ fi; \
+ done
++ $(INSTALL_DATA) `cat pysysconfigdatadir.txt`/_sysconfigdata.py \
++ $(DESTDIR)$(LIBDEST)
++ mkdir -p $(DESTDIR)$(LIBDEST)/sysconfigdata
++ $(INSTALL_DATA) `cat pysysconfigdatadir.txt`/_sysconfigdata.py \
++ $(DESTDIR)$(LIBDEST)/sysconfigdata
+ @for d in $(LIBSUBDIRS); \
+ do \
+ a=$(srcdir)/Lib/$$d; \
+@@ -1513,7 +1521,7 @@
+ find build -name 'fficonfig.h' -exec rm -f {} ';' || true
+ find build -name '*.py' -exec rm -f {} ';' || true
+ find build -name '*.py[co]' -exec rm -f {} ';' || true
+- -rm -f pybuilddir.txt
++ -rm -f pybuilddir.txt pysysconfigdatadir.txt
+ -rm -f Lib/lib2to3/*Grammar*.pickle
+ -rm -f Modules/_testembed Modules/_freeze_importlib
+
+Index: b/configure.ac
+===================================================================
+--- a/configure.ac
++++ b/configure.ac
+@@ -67,7 +67,7 @@
+ AC_MSG_ERROR([python$PACKAGE_VERSION interpreter not found])
+ fi
+ AC_MSG_RESULT($interp)
+- PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/$(PLATDIR) '$interp
++ PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pysysconfigdatadir.txt && echo $(abs_builddir)/`cat pysysconfigdatadir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/$(PLATDIR) '$interp
+ fi
+ elif test "$cross_compiling" = maybe; then
+ AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH])
diff --git a/package/python3/python3-004-no-import-when-cross-compiling.patch b/package/python3/python3-004-no-import-when-cross-compiling.patch
deleted file mode 100644
index cd5a437..0000000
--- a/package/python3/python3-004-no-import-when-cross-compiling.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-Disable import check when cross-compiling
-
-Once Python has compiled an extension (i.e some C code, potentially
-linked to a library), it tries to import it. This cannot work in
-cross-compilation mode, so we just disable this check.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
----
- setup.py | 4 ++++
- 1 file changed, 4 insertions(+)
-
-Index: Python-3.3.0/setup.py
-===================================================================
---- Python-3.3.0.orig/setup.py
-+++ Python-3.3.0/setup.py
-@@ -318,6 +318,10 @@
- self.announce('WARNING: skipping import check for Cygwin-based "%s"'
- % ext.name)
- return
-+ if os.environ.get('CROSS_COMPILING') == 'yes':
-+ self.announce('WARNING: skipping import check for cross compiled "%s"'
-+ % ext.name)
-+ return
- ext_filename = os.path.join(
- self.build_lib,
- self.get_ext_filename(self.get_ext_fullname(ext.name)))
diff --git a/package/python3/python3-112-old-stdlib-cache.patch b/package/python3/python3-004-old-stdlib-cache.patch
similarity index 61%
rename from package/python3/python3-112-old-stdlib-cache.patch
rename to package/python3/python3-004-old-stdlib-cache.patch
index 5a2cf8b..ac34f8d 100644
--- a/package/python3/python3-112-old-stdlib-cache.patch
+++ b/package/python3/python3-004-old-stdlib-cache.patch
@@ -8,11 +8,13 @@ See http://www.python.org/dev/peps/pep-3147
Signed-off-by: Daniel Nelson <daniel@sigpwr.com>
---- python3-3.3.0/configure.ac 2013-01-27 16:35:52.429067797 -0800
-+++ python3-3.3.0/configure.ac 2013-01-27 16:43:43.528601443 -0800
-@@ -1827,6 +1827,23 @@
- LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
- esac
+Index: b/configure.ac
+===================================================================
+--- a/configure.ac
++++ b/configure.ac
+@@ -349,6 +349,23 @@
+ AC_SUBST(FRAMEWORKUNIXTOOLSPREFIX)
+ AC_SUBST(FRAMEWORKINSTALLAPPSPREFIX)
+STDLIB_CACHE_FLAGS=
+AC_MSG_CHECKING(for --enable-old-stdlib-cache)
@@ -31,12 +33,14 @@ Signed-off-by: Daniel Nelson <daniel@sigpwr.com>
+])
+AC_SUBST(STDLIB_CACHE_FLAGS)
+
- AC_MSG_CHECKING(for --enable-framework)
- if test "$enable_framework"
- then
---- python3-3.3.0/Makefile.pre.in 2013-01-27 16:35:52.422067642 -0800
-+++ python3-3.3.0/Makefile.pre.in 2013-01-27 16:37:03.710650439 -0800
-@@ -143,6 +143,9 @@
+ ##AC_ARG_WITH(dyld,
+ ## AS_HELP_STRING([--with-dyld],
+ ## [Use (OpenStep|Rhapsody) dynamic linker]))
+Index: b/Makefile.pre.in
+===================================================================
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -157,6 +157,9 @@
# Options to enable prebinding (for fast startup prior to Mac OS X 10.3)
OTHER_LIBTOOL_OPT=@OTHER_LIBTOOL_OPT@
@@ -46,7 +50,7 @@ Signed-off-by: Daniel Nelson <daniel@sigpwr.com>
# Environment to run shared python without installed libraries
RUNSHARED= @RUNSHARED@
-@@ -1079,12 +1082,12 @@
+@@ -1231,21 +1234,21 @@
fi
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
$(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
@@ -54,10 +58,21 @@ Signed-off-by: Daniel Nelson <daniel@sigpwr.com>
+ -d $(LIBDEST) -f $(STDLIB_CACHE_FLAGS) \
-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
$(DESTDIR)$(LIBDEST)
+ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+ $(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
+- -d $(LIBDEST) -f \
++ -d $(LIBDEST) -f $(STDLIB_CACHE_FLAGS) \
+ -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
+ $(DESTDIR)$(LIBDEST)
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
$(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
- -d $(LIBDEST)/site-packages -f \
+ -d $(LIBDEST)/site-packages -f $(STDLIB_CACHE_FLAGS) \
-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+ $(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
+- -d $(LIBDEST)/site-packages -f \
++ -d $(LIBDEST)/site-packages -f $(STDLIB_CACHE_FLAGS) \
+ -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
+ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
$(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
diff --git a/package/python3/python3-005-do-not-generate-pyo-files.patch b/package/python3/python3-005-do-not-generate-pyo-files.patch
deleted file mode 100644
index 983d546..0000000
--- a/package/python3/python3-005-do-not-generate-pyo-files.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-Do not generate .pyo files
-
-By default, the Python installation byte-compiles all modules in two
-forms: the normal bytecode (.pyc) and an optimized bytecode (.pyo).
-
-According to
-http://www.network-theory.co.uk/docs/pytut/CompiledPythonfiles.html,
-the optimization do not do anything useful, and generating both the
-"non-optimized" and "optimized" bytecode variants takes time.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
----
- Makefile.pre.in | 9 ---------
- 1 file changed, 9 deletions(-)
-
-Index: Python-3.3.0/Makefile.pre.in
-===================================================================
---- Python-3.3.0.orig/Makefile.pre.in
-+++ Python-3.3.0/Makefile.pre.in
-@@ -1082,20 +1082,11 @@
- -d $(LIBDEST) -f \
- -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
- $(DESTDIR)$(LIBDEST)
-- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-- $(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
-- -d $(LIBDEST) -f \
-- -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
-- $(DESTDIR)$(LIBDEST)
- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
- $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
- -d $(LIBDEST)/site-packages -f \
- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
-- $(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
-- -d $(LIBDEST)/site-packages -f \
-- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
-- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
- $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
- $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt
diff --git a/package/python3/python3-005-pyc-pyo-conditional.patch b/package/python3/python3-005-pyc-pyo-conditional.patch
new file mode 100644
index 0000000..6b08c82
--- /dev/null
+++ b/package/python3/python3-005-pyc-pyo-conditional.patch
@@ -0,0 +1,60 @@
+Index: b/Makefile.pre.in
+===================================================================
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -1232,24 +1232,32 @@
+ $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
+ $(DESTDIR)$(LIBDEST)/distutils/tests ; \
+ fi
++ifeq (@PYC_BUILD@,yes)
+ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+ $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
+ -d $(LIBDEST) -f $(STDLIB_CACHE_FLAGS) \
+ -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
+ $(DESTDIR)$(LIBDEST)
++endif
++ifeq (@PYO_BUILD@,yes)
+ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+ $(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
+ -d $(LIBDEST) -f $(STDLIB_CACHE_FLAGS) \
+ -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
+ $(DESTDIR)$(LIBDEST)
++endif
++ifeq (@PYC_BUILD@,yes)
+ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+ $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
+ -d $(LIBDEST)/site-packages -f $(STDLIB_CACHE_FLAGS) \
+ -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
++endif
++ifeq (@PYO_BUILD@,yes)
+ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+ $(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
+ -d $(LIBDEST)/site-packages -f $(STDLIB_CACHE_FLAGS) \
+ -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
++endif
+ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+ $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
+ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
+Index: b/configure.ac
+===================================================================
+--- a/configure.ac
++++ b/configure.ac
+@@ -936,6 +936,18 @@
+
+ AC_MSG_CHECKING(LDLIBRARY)
+
++AC_SUBST(PYC_BUILD)
++
++AC_ARG_ENABLE(pyc-build,
++ AS_HELP_STRING([--disable-pyc-build], [disable build of pyc files]),
++ [ PYC_BUILD="${enableval}" ], [ PYC_BUILD=yes ])
++
++AC_SUBST(PYO_BUILD)
++
++AC_ARG_ENABLE(pyo-build,
++ AS_HELP_STRING([--disable-pyo-build], [disable build of pyo files]),
++ [ PYO_BUILD="${enableval}" ], [ PYO_BUILD=yes ])
++
+ # MacOSX framework builds need more magic. LDLIBRARY is the dynamic
+ # library that we build, but we do not want to link against it (we
+ # will find it with a -framework option). For this reason there is an
diff --git a/package/python3/python3-011-cross-compile-getaddrinfo.patch b/package/python3/python3-006-cross-compile-getaddrinfo.patch
similarity index 81%
rename from package/python3/python3-011-cross-compile-getaddrinfo.patch
rename to package/python3/python3-006-cross-compile-getaddrinfo.patch
index 33286ce..512a534 100644
--- a/package/python3/python3-011-cross-compile-getaddrinfo.patch
+++ b/package/python3/python3-006-cross-compile-getaddrinfo.patch
@@ -6,11 +6,11 @@ Signed-off-by: Vanya Sergeev <vsergeev@gmail.com>
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-Index: Python-3.3.0/configure.ac
+Index: b/configure.ac
===================================================================
---- Python-3.3.0.orig/configure.ac
-+++ Python-3.3.0/configure.ac
-@@ -3204,7 +3204,7 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -3423,7 +3423,7 @@
AC_MSG_RESULT($ac_cv_buggy_getaddrinfo)
diff --git a/package/python3/python3-006-reread-environment.patch b/package/python3/python3-006-reread-environment.patch
deleted file mode 100644
index 752b15a..0000000
--- a/package/python3/python3-006-reread-environment.patch
+++ /dev/null
@@ -1,63 +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 | 4 +++-
- setup.py | 3 +++
- 2 files changed, 6 insertions(+), 1 deletion(-)
-
-Index: Python-3.3.0/setup.py
-===================================================================
---- Python-3.3.0.orig/setup.py
-+++ Python-3.3.0/setup.py
-@@ -30,6 +30,9 @@
- # Were we compiled --with-pydebug or with #define Py_DEBUG?
- COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS"))
-
-+sysconfig.get_config_vars()
-+sysconfig._CONFIG_VARS.update(os.environ)
-+
- # This global variable is used to hold the list of modules to be disabled.
- disabled_module_list = []
-
-Index: Python-3.3.0/Makefile.pre.in
-===================================================================
---- Python-3.3.0.orig/Makefile.pre.in
-+++ Python-3.3.0/Makefile.pre.in
-@@ -478,6 +478,7 @@
- sharedmods: $(BUILDPYTHON) pybuilddir.txt
- case $$MAKEFLAGS in *s*) quiet=-q; esac; \
- $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \
-+ CONFIG_ARGS="$(CONFIG_ARGS)" \
- $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build
-
- # Build static library
-@@ -1183,7 +1184,8 @@
- # Install the dynamically loadable modules
- # This goes into $(exec_prefix)
- sharedinstall: sharedmods
-- $(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \
-+ $(RUNSHARED) CONFIG_ARGS="$(CONFIG_ARGS)" \
-+ $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \
- --prefix=$(prefix) \
- --install-scripts=$(BINDIR) \
- --install-platlib=$(DESTSHARED) \
diff --git a/package/python3/python3-007-change-pyconfig-h-location.patch b/package/python3/python3-007-change-pyconfig-h-location.patch
deleted file mode 100644
index 8d45dae..0000000
--- a/package/python3/python3-007-change-pyconfig-h-location.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-Change the location of pyconfig.h
-
-The Python interpreter has a really strange behaviour: at *runtime*,
-it reads a Makefile and a header file named pyconfig.h to get some
-information about the configuration.
-
-The Makefile is located in usr/lib/python3.3/config-3.3m, which is fine
-since this location is kept on the target.
-
-However, by default, the pyconfig.h is installed in
-usr/include/python3.3m, but we completely remove the usr/include
-directory for the target. Since making an exception just for
-pyconfig.h is annoying, this patch also installs pyconfig.h to
-usr/lib/python3.3/config-3.3m, and modifies the sysconfig module so that it
-looks in this location instead of usr/include.
-
-The pyconfig.h is still kept in usr/include/python3.3m, because it is
-needed in the $(STAGING_DIR) when building third-party Python
-extensions that contain C code.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
----
- Lib/distutils/sysconfig.py | 3 ++-
- Lib/sysconfig.py | 2 +-
- Makefile.pre.in | 3 ++-
- 3 files changed, 5 insertions(+), 3 deletions(-)
-
-Index: Python-3.3.0/Lib/distutils/sysconfig.py
-===================================================================
---- Python-3.3.0.orig/Lib/distutils/sysconfig.py
-+++ Python-3.3.0/Lib/distutils/sysconfig.py
-@@ -239,7 +239,8 @@
- else:
- inc_dir = _sys_home or project_base
- else:
-- inc_dir = get_python_inc(plat_specific=1)
-+ lib_dir = get_python_lib(plat_specific=1, standard_lib=1)
-+ inc_dir = os.path.join(lib_dir, "config")
- if get_python_version() < '2.2':
- config_h = 'config.h'
- else:
-Index: Python-3.3.0/Lib/sysconfig.py
-===================================================================
---- Python-3.3.0.orig/Lib/sysconfig.py
-+++ Python-3.3.0/Lib/sysconfig.py
-@@ -467,7 +467,7 @@
- else:
- inc_dir = _sys_home or _PROJECT_BASE
- else:
-- inc_dir = get_path('platinclude')
-+ inc_dir = os.path.join(get_path('stdlib'), "config")
- return os.path.join(inc_dir, 'pyconfig.h')
-
-
-Index: Python-3.3.0/Makefile.pre.in
-===================================================================
---- Python-3.3.0.orig/Makefile.pre.in
-+++ Python-3.3.0/Makefile.pre.in
-@@ -1123,7 +1123,6 @@
- echo $(INSTALL_DATA) $$i $(INCLUDEPY); \
- $(INSTALL_DATA) $$i $(DESTDIR)$(INCLUDEPY); \
- done
-- $(INSTALL_DATA) pyconfig.h $(DESTDIR)$(CONFINCLUDEPY)/pyconfig.h
-
- # Install the library and miscellaneous stuff needed for extending/embedding
- # This goes into $(exec_prefix)
-@@ -1157,6 +1156,8 @@
- $(INSTALL_DATA) Modules/python.o $(DESTDIR)$(LIBPL)/python.o
- $(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config.c.in
- $(INSTALL_DATA) Makefile $(DESTDIR)$(LIBPL)/Makefile
-+ $(INSTALL_DATA) pyconfig.h $(DESTDIR)$(LIBPL)/pyconfig.h
-+ $(INSTALL_DATA) pyconfig.h $(DESTDIR)$(CONFINCLUDEPY)/pyconfig.h
- $(INSTALL_DATA) Modules/Setup $(DESTDIR)$(LIBPL)/Setup
- $(INSTALL_DATA) Modules/Setup.local $(DESTDIR)$(LIBPL)/Setup.local
- $(INSTALL_DATA) Modules/Setup.config $(DESTDIR)$(LIBPL)/Setup.config
diff --git a/package/python3/python3-012-disable-extensions.patch b/package/python3/python3-007-disable-extensions.patch
similarity index 78%
rename from package/python3/python3-012-disable-extensions.patch
rename to package/python3/python3-007-disable-extensions.patch
index ed1d1e2..462fed4 100644
--- a/package/python3/python3-012-disable-extensions.patch
+++ b/package/python3/python3-007-disable-extensions.patch
@@ -38,11 +38,11 @@ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
setup.py | 5 ++++-
3 files changed, 10 insertions(+), 1 deletion(-)
-Index: cpython/Makefile.pre.in
+Index: b/Makefile.pre.in
===================================================================
---- cpython.orig/Makefile.pre.in
-+++ cpython/Makefile.pre.in
-@@ -155,6 +155,8 @@
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -175,6 +175,8 @@
# configure script arguments
CONFIG_ARGS= @CONFIG_ARGS@
@@ -51,27 +51,29 @@ Index: cpython/Makefile.pre.in
# Subdirectories with code
SRCDIRS= @SRCDIRS@
-@@ -478,6 +480,7 @@
- sharedmods: $(BUILDPYTHON) pybuilddir.txt
+@@ -561,6 +563,7 @@
+ esac; \
$(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \
- CONFIG_ARGS="$(CONFIG_ARGS)" \
+ _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \
+ DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" \
- $(PYTHON_FOR_BUILD) $(srcdir)/setup.py build
+ $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build
# Build static library
-@@ -1185,6 +1188,7 @@
+@@ -1371,7 +1374,8 @@
+ # Install the dynamically loadable modules
# This goes into $(exec_prefix)
sharedinstall: sharedmods
- $(RUNSHARED) CONFIG_ARGS="$(CONFIG_ARGS)" \
-+ DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" \
- $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \
+- $(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \
++ $(RUNSHARED) DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" \
++ $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \
--prefix=$(prefix) \
--install-scripts=$(BINDIR) \
-Index: cpython/configure.ac
+ --install-platlib=$(DESTSHARED) \
+Index: b/configure.ac
===================================================================
---- cpython.orig/configure.ac
-+++ cpython/configure.ac
-@@ -2175,6 +2175,8 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -2360,6 +2360,8 @@
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
@@ -80,12 +82,12 @@ Index: cpython/configure.ac
# Check for use of the system expat library
AC_MSG_CHECKING(for --with-system-expat)
AC_ARG_WITH(system_expat,
-Index: cpython/setup.py
+Index: b/setup.py
===================================================================
---- cpython.orig/setup.py
-+++ cpython/setup.py
-@@ -34,7 +34,10 @@
- sysconfig._CONFIG_VARS.update(os.environ)
+--- a/setup.py
++++ b/setup.py
+@@ -33,7 +33,10 @@
+ COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS"))
# This global variable is used to hold the list of modules to be disabled.
-disabled_module_list = []
diff --git a/package/python3/python3-008-distutils-sysconfig-use-sysconfigdata.patch b/package/python3/python3-008-distutils-sysconfig-use-sysconfigdata.patch
new file mode 100644
index 0000000..c77fed3
--- /dev/null
+++ b/package/python3/python3-008-distutils-sysconfig-use-sysconfigdata.patch
@@ -0,0 +1,58 @@
+Index: b/Lib/distutils/sysconfig.py
+===================================================================
+--- a/Lib/distutils/sysconfig.py
++++ b/Lib/distutils/sysconfig.py
+@@ -430,49 +430,11 @@
+
+ def _init_posix():
+ """Initialize the module as appropriate for POSIX systems."""
+- g = {}
+- # load the installed Makefile:
+- try:
+- filename = get_makefile_filename()
+- parse_makefile(filename, g)
+- except OSError as msg:
+- my_msg = "invalid Python installation: unable to open %s" % filename
+- if hasattr(msg, "strerror"):
+- my_msg = my_msg + " (%s)" % msg.strerror
+-
+- raise DistutilsPlatformError(my_msg)
+-
+- # load the installed pyconfig.h:
+- try:
+- filename = get_config_h_filename()
+- with open(filename) as file:
+- parse_config_h(file, g)
+- except OSError as msg:
+- my_msg = "invalid Python installation: unable to open %s" % filename
+- if hasattr(msg, "strerror"):
+- my_msg = my_msg + " (%s)" % msg.strerror
+-
+- raise DistutilsPlatformError(my_msg)
+-
+- # On AIX, there are wrong paths to the linker scripts in the Makefile
+- # -- these paths are relative to the Python source, but when installed
+- # the scripts are in another directory.
+- if python_build:
+- g['LDSHARED'] = g['BLDSHARED']
+-
+- elif get_python_version() < '2.1':
+- # The following two branches are for 1.5.2 compatibility.
+- if sys.platform == 'aix4': # what about AIX 3.x ?
+- # Linker script is in the config directory, not in Modules as the
+- # Makefile says.
+- python_lib = get_python_lib(standard_lib=1)
+- ld_so_aix = os.path.join(python_lib, 'config', 'ld_so_aix')
+- python_exp = os.path.join(python_lib, 'config', 'python.exp')
+-
+- g['LDSHARED'] = "%s %s -bI:%s" % (ld_so_aix, g['CC'], python_exp)
+-
++ # _sysconfigdata is generated at build time, see the sysconfig module
++ from _sysconfigdata import build_time_vars
+ global _config_vars
+- _config_vars = g
++ _config_vars = {}
++ _config_vars.update(build_time_vars)
+
+
+ def _init_nt():
diff --git a/package/python3/python3-008-no-rpath.patch b/package/python3/python3-008-no-rpath.patch
deleted file mode 100644
index cdeec22..0000000
--- a/package/python3/python3-008-no-rpath.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-Remove runtime library paths
-
-For some extensions (sqlite and dbm), Python setup.py script
-hardcode a runtime path (rpath) into the extension. However, this
-runtime path is incorrect (because it points to the location of the
-library directory on the development machine) and useless (because on
-the target, all useful libraries are in a standard directory searched
-by the dynamic loader). For those reasons, we just get rid of the
-runtime paths in cross-compilation mode.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
----
- setup.py | 12 ++++++++++--
- 1 file changed, 10 insertions(+), 2 deletions(-)
-
-Index: Python-3.3.0/setup.py
-===================================================================
---- Python-3.3.0.orig/setup.py
-+++ Python-3.3.0/setup.py
-@@ -1134,11 +1134,15 @@
- # can end up with a bad search path order.
- if sqlite_incdir not in self.compiler.include_dirs:
- include_dirs.append(sqlite_incdir)
-+ if cross_compiling:
-+ sqlite_runtime_libdir = None
-+ else:
-+ sqlite_runtime_libdir = sqlite_libdir
- exts.append(Extension('_sqlite3', sqlite_srcs,
- define_macros=sqlite_defines,
- include_dirs=include_dirs,
- library_dirs=sqlite_libdir,
-- runtime_library_dirs=sqlite_libdir,
-+ runtime_library_dirs=sqlite_runtime_libdir,
- extra_link_args=sqlite_extra_link_args,
- libraries=["sqlite3",]))
- else:
-@@ -1205,9 +1209,13 @@
- elif cand == "bdb":
- if db_incs is not None:
- if dbm_setup_debug: print("building dbm using bdb")
-+ if cross_compiling:
-+ dblib_runtime_libdir = None
-+ else:
-+ dblib_runtime_libdir = dblib_dir
- dbmext = Extension('_dbm', ['_dbmmodule.c'],
- library_dirs=dblib_dir,
-- runtime_library_dirs=dblib_dir,
-+ runtime_library_dirs=dblib_runtime_libdir,
- include_dirs=db_incs,
- define_macros=[
- ('HAVE_BERKDB_H', None),
diff --git a/package/python3/python3-009-distutils-use-python-sysroot.patch b/package/python3/python3-009-distutils-use-python-sysroot.patch
new file mode 100644
index 0000000..cfe30fe
--- /dev/null
+++ b/package/python3/python3-009-distutils-use-python-sysroot.patch
@@ -0,0 +1,57 @@
+Adjust library/header paths for cross-compilation
+
+When cross-compiling third-party extensions, the get_python_inc() or
+get_python_lib() can be called, to return the path to headers or
+libraries. However, they use the sys.prefix of the host Python, which
+returns incorrect paths when cross-compiling (paths pointing to host
+headers and libraries).
+
+In order to fix this, we introduce the _python_sysroot, _python_prefix
+and _python_exec_prefix variables, that allow to override these
+values, and get correct header/library paths when cross-compiling
+third-party Python modules.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+Index: b/Lib/distutils/sysconfig.py
+===================================================================
+--- a/Lib/distutils/sysconfig.py
++++ b/Lib/distutils/sysconfig.py
+@@ -16,10 +16,17 @@
+ from .errors import DistutilsPlatformError
+
+ # These are needed in a couple of spots, so just compute them once.
+-PREFIX = os.path.normpath(sys.prefix)
+-EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
+-BASE_PREFIX = os.path.normpath(sys.base_prefix)
+-BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix)
++if "_python_sysroot" in os.environ:
++ _sysroot=os.environ.get('_python_sysroot')
++ PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_prefix'))
++ EXEC_PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_exec_prefix'))
++ BASE_PREFIX = PREFIX
++ BASE_EXEC_PREFIX = EXEC_PREFIX
++else:
++ PREFIX = os.path.normpath(sys.prefix)
++ EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
++ BASE_PREFIX = os.path.normpath(sys.base_prefix)
++ BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix)
+
+ # Path to the base directory of the project. On Windows the binary may
+ # live in project/PCBuild9. If we're dealing with an x64 Windows build,
+Index: b/Lib/distutils/command/build_ext.py
+===================================================================
+--- a/Lib/distutils/command/build_ext.py
++++ b/Lib/distutils/command/build_ext.py
+@@ -248,7 +248,10 @@
+ if (sysconfig.get_config_var('Py_ENABLE_SHARED')):
+ if not sysconfig.python_build:
+ # building third party extensions
+- self.library_dirs.append(sysconfig.get_config_var('LIBDIR'))
++ libdir = sysconfig.get_config_var('LIBDIR')
++ if "_python_sysroot" in os.environ:
++ libdir = os.environ.get("_python_sysroot") + libdir
++ self.library_dirs.append(libdir)
+ else:
+ # building python standard extensions
+ self.library_dirs.append('.')
diff --git a/package/python3/python3-009-verbose-module-build.patch b/package/python3/python3-009-verbose-module-build.patch
deleted file mode 100644
index 60b6d79..0000000
--- a/package/python3/python3-009-verbose-module-build.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-Enables verbose output when building modules
-
-Patch borrowed from OpenBricks.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-
----
- Makefile.pre.in | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-Index: Python-3.3.0/Makefile.pre.in
-===================================================================
---- Python-3.3.0.orig/Makefile.pre.in
-+++ Python-3.3.0/Makefile.pre.in
-@@ -476,10 +476,9 @@
-
- # Build the shared modules
- sharedmods: $(BUILDPYTHON) pybuilddir.txt
-- case $$MAKEFLAGS in *s*) quiet=-q; esac; \
- $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \
- CONFIG_ARGS="$(CONFIG_ARGS)" \
-- $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build
-+ $(PYTHON_FOR_BUILD) $(srcdir)/setup.py build
-
- # Build static library
- # avoid long command lines, same as LIBRARY_OBJS
diff --git a/package/python3/python3-010-distutils-cross-compilation-support.patch b/package/python3/python3-010-distutils-cross-compilation-support.patch
deleted file mode 100644
index 0a51400..0000000
--- a/package/python3/python3-010-distutils-cross-compilation-support.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-Add some cross-compilation fixes to distutils
-
-Inspired by work done by Marc Kleine-Budde <mkl@pengutronix.de> in
-PTXdist.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
----
- Lib/distutils/sysconfig.py | 17 +++++++++++++----
- configure.ac | 8 +++++++-
- 2 files changed, 20 insertions(+), 5 deletions(-)
-
-Index: Python-3.3.0/Lib/distutils/sysconfig.py
-===================================================================
---- Python-3.3.0.orig/Lib/distutils/sysconfig.py
-+++ Python-3.3.0/Lib/distutils/sysconfig.py
-@@ -16,15 +16,24 @@
- from .errors import DistutilsPlatformError
-
- # These are needed in a couple of spots, so just compute them once.
--PREFIX = os.path.normpath(sys.prefix)
--EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
-+EXECUTABLE_DIRNAME = os.path.dirname(os.path.realpath(sys.executable))
-+if os.environ.get('CROSS_COMPILING') == 'yes':
-+ _sysroot=os.environ.get('_python_sysroot')
-+ PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_prefix'))
-+ EXEC_PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_exec_prefix'))
-+ if '_python_srcdir' in os.environ:
-+ EXECUTABLE_DIRNAME = os.path.normpath(os.environ['_python_srcdir'])
-+else:
-+ PREFIX = os.path.normpath(sys.prefix)
-+ EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
-+
- BASE_PREFIX = os.path.normpath(sys.base_prefix)
- BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix)
-
- # Path to the base directory of the project. On Windows the binary may
- # live in project/PCBuild9. If we're dealing with an x64 Windows build,
- # it'll live in project/PCbuild/amd64.
--project_base = os.path.dirname(os.path.abspath(sys.executable))
-+project_base = EXECUTABLE_DIRNAME
- if os.name == "nt" and "pcbuild" in project_base[-8:].lower():
- project_base = os.path.abspath(os.path.join(project_base, os.path.pardir))
- # PC/VS7.1
-@@ -98,7 +107,7 @@
- # the build directory may not be the source directory, we
- # must use "srcdir" from the makefile to find the "Include"
- # directory.
-- base = _sys_home or os.path.dirname(os.path.abspath(sys.executable))
-+ base = _sys_home or EXECUTABLE_DIRNAME
- if plat_specific:
- return base
- if _sys_home:
-Index: Python-3.3.0/configure.ac
-===================================================================
---- Python-3.3.0.orig/configure.ac
-+++ Python-3.3.0/configure.ac
-@@ -963,7 +963,13 @@
- fi
-
- if test "$cross_compiling" = yes; then
-- RUNSHARED=
-+ RUNSHARED=" \
-+ CROSS_COMPILING=yes \
-+ _python_cross_host=${ac_cv_host} \
-+ _python_sysroot=\"\$(sysroot)\" \
-+ _python_srcdir=\"\$(srcdir)\" \
-+ _python_prefix=\"\$(prefix)\" \
-+ _python_exec_prefix=\"\$(exec_prefix)\""
- fi
-
- AC_MSG_RESULT($LDLIBRARY)
diff --git a/package/python3/python3-010-no-termcap-host-path.patch b/package/python3/python3-010-no-termcap-host-path.patch
new file mode 100644
index 0000000..57fe47a
--- /dev/null
+++ b/package/python3/python3-010-no-termcap-host-path.patch
@@ -0,0 +1,22 @@
+Don't look in /usr/lib/termcap for libraries
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+Index: b/setup.py
+===================================================================
+--- a/setup.py
++++ b/setup.py
+@@ -725,12 +725,9 @@
+ pass # Issue 7384: Already linked against curses or tinfo.
+ elif curses_library:
+ readline_libs.append(curses_library)
+- elif self.compiler.find_library_file(lib_dirs +
+- ['/usr/lib/termcap'],
+- 'termcap'):
++ elif self.compiler.find_library_file(lib_dirs, 'termcap'):
+ readline_libs.append('termcap')
+ exts.append( Extension('readline', ['readline.c'],
+- library_dirs=['/usr/lib/termcap'],
+ extra_link_args=readline_extra_link_args,
+ libraries=readline_libs) )
+ else:
diff --git a/package/python3/python3-100-optional-test-modules.patch b/package/python3/python3-100-optional-test-modules.patch
index 13e73a7..6b52509 100644
--- a/package/python3/python3-100-optional-test-modules.patch
+++ b/package/python3/python3-100-optional-test-modules.patch
@@ -11,11 +11,11 @@ Signed-off-by: Samuel Martin <s.martin49@gmail.com>
configure.ac | 6 ++++++
2 files changed, 38 insertions(+), 18 deletions(-)
-Index: cpython/Makefile.pre.in
+Index: b/Makefile.pre.in
===================================================================
---- cpython.orig/Makefile.pre.in
-+++ cpython/Makefile.pre.in
-@@ -976,8 +976,26 @@
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -1120,8 +1120,30 @@
EXTRAPLATDIR= @EXTRAPLATDIR@
MACHDEPS= $(PLATDIR) $(EXTRAPLATDIR)
XMLLIBSUBDIRS= xml xml/dom xml/etree xml/parsers xml/sax
@@ -23,13 +23,16 @@ Index: cpython/Makefile.pre.in
- tkinter/test/test_ttk site-packages test \
+LIBSUBDIRS= tkinter \
+ site-packages \
++ asyncio \
+ collections concurrent concurrent/futures encodings \
+ email email/mime \
++ ensurepip ensurepip/_bundled \
+ html json http dbm xmlrpc \
+ sqlite3 \
+ logging csv wsgiref urllib \
+ lib2to3 lib2to3/fixes lib2to3/pgen2 \
-+ ctypes ctypes/macholib idlelib idlelib/Icons \
++ ctypes ctypes/macholib \
++ idlelib idlelib/Icons \
+ distutils distutils/command $(XMLLIBSUBDIRS) \
+ importlib \
+ turtledemo \
@@ -38,37 +41,34 @@ Index: cpython/Makefile.pre.in
+ venv venv/scripts venv/scripts/posix \
+ curses pydoc_data $(MACHDEPS)
+
-+ifeq (@TEST_MODULES@,yes)
-+LIBSUBDIRS += tkinter/test tkinter/test/test_tkinter \
-+ tkinter/test/test_ttk test \
++TESTSUBDIRS = tkinter/test tkinter/test/test_tkinter tkinter/test/test_ttk \
++ test test/test_asyncio ctypes/test \
++ test/test_email test/test_email/data \
++ test/test_json \
+ test/audiodata \
test/capath test/data \
test/cjkencodings test/decimaltestdata test/xmltestdata \
- test/subprocessdata test/sndhdrdata \
-@@ -1000,26 +1018,22 @@
- test/namespace_pkgs/project3 \
- test/namespace_pkgs/project3/parent \
+@@ -1148,28 +1170,20 @@
test/namespace_pkgs/project3/parent/child \
-- test/namespace_pkgs/module_and_namespace_package \
-- test/namespace_pkgs/module_and_namespace_package/a_test \
+ test/namespace_pkgs/module_and_namespace_package \
+ test/namespace_pkgs/module_and_namespace_package/a_test \
+- asyncio \
+- test/test_asyncio \
- collections concurrent concurrent/futures encodings \
- email email/mime test/test_email test/test_email/data \
-- html json test/json_tests http dbm xmlrpc \
+- ensurepip ensurepip/_bundled \
+- html json test/test_json http dbm xmlrpc \
- sqlite3 sqlite3/test \
- logging csv wsgiref urllib \
- lib2to3 lib2to3/fixes lib2to3/pgen2 lib2to3/tests \
-+ test/namespace_pkgs/module_and_namespace_package \
-+ test/namespace_pkgs/module_and_namespace_package/a_test \
-+ test/test_email test/test_email/data \
-+ test/json_tests \
-+ sqlite3/test \
+ lib2to3/tests \
lib2to3/tests/data lib2to3/tests/data/fixers \
lib2to3/tests/data/fixers/myfixes \
-- ctypes ctypes/test ctypes/macholib idlelib idlelib/Icons \
+- ctypes ctypes/test ctypes/macholib \
+- idlelib idlelib/Icons idlelib/idle_test \
- distutils distutils/command distutils/tests $(XMLLIBSUBDIRS) \
- importlib test/test_importlib test/test_importlib/builtin \
-+ ctypes/test \
-+ distutils/tests \
++ sqlite3/test idlelib/idle_test \
+ test/test_importlib test/test_importlib/builtin \
test/test_importlib/extension test/test_importlib/frozen \
test/test_importlib/import_ test/test_importlib/source \
@@ -77,17 +77,21 @@ Index: cpython/Makefile.pre.in
- unittest unittest/test unittest/test/testmock \
- venv venv/scripts venv/scripts/posix \
- curses pydoc_data $(MACHDEPS)
-+ unittest unittest/test unittest/test/testmock
++ unittest/test unittest/test/testmock \
++ distutils/tests
++
++ifeq (@TEST_MODULES@,yes)
++LIBSUBDIRS += $(TESTSUBDIRS)
+endif
+
libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
@for i in $(SCRIPTDIR) $(LIBDEST); \
do \
-Index: cpython/configure.ac
+Index: b/configure.ac
===================================================================
---- cpython.orig/configure.ac
-+++ cpython/configure.ac
-@@ -2449,6 +2449,12 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -2667,6 +2667,12 @@
fi
diff --git a/package/python3/python3-101-optional-pydoc.patch b/package/python3/python3-101-optional-pydoc.patch
index ac50ac3..331c842 100644
--- a/package/python3/python3-101-optional-pydoc.patch
+++ b/package/python3/python3-101-optional-pydoc.patch
@@ -12,11 +12,11 @@ Signed-off-by: Samuel Martin <s.martin49@gmail.com>
setup.py | 9 +++++++--
3 files changed, 19 insertions(+), 3 deletions(-)
-Index: cpython/Makefile.pre.in
+Index: b/Makefile.pre.in
===================================================================
---- cpython.orig/Makefile.pre.in
-+++ cpython/Makefile.pre.in
-@@ -952,7 +952,9 @@
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -1087,7 +1087,9 @@
-rm -f $(DESTDIR)$(BINDIR)/idle3
(cd $(DESTDIR)$(BINDIR); $(LN) -s idle$(VERSION) idle3)
-rm -f $(DESTDIR)$(BINDIR)/pydoc3
@@ -26,32 +26,32 @@ Index: cpython/Makefile.pre.in
-rm -f $(DESTDIR)$(BINDIR)/2to3
(cd $(DESTDIR)$(BINDIR); $(LN) -s 2to3-$(VERSION) 2to3)
-rm -f $(DESTDIR)$(BINDIR)/pyvenv
-@@ -991,7 +993,7 @@
+@@ -1138,7 +1140,7 @@
multiprocessing multiprocessing/dummy \
unittest \
venv venv/scripts venv/scripts/posix \
- curses pydoc_data $(MACHDEPS)
+ curses $(MACHDEPS)
- ifeq (@TEST_MODULES@,yes)
- LIBSUBDIRS += tkinter/test tkinter/test/test_tkinter \
-@@ -1034,6 +1036,10 @@
- unittest unittest/test unittest/test/testmock
- endif
+ TESTSUBDIRS = tkinter/test tkinter/test/test_tkinter tkinter/test/test_ttk \
+ test test/test_asyncio ctypes/test \
+@@ -1180,6 +1182,10 @@
+ unittest/test unittest/test/testmock \
+ distutils/tests
+ifeq (@PYDOC@,yes)
+LIBSUBDIRS += pydoc_data
+endif
+
- libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
- @for i in $(SCRIPTDIR) $(LIBDEST); \
- do \
-Index: cpython/configure.ac
+ ifeq (@TEST_MODULES@,yes)
+ LIBSUBDIRS += $(TESTSUBDIRS)
+ endif
+Index: b/configure.ac
===================================================================
---- cpython.orig/configure.ac
-+++ cpython/configure.ac
-@@ -2448,6 +2448,11 @@
- esac])
+--- a/configure.ac
++++ b/configure.ac
+@@ -2666,6 +2666,11 @@
+ AC_CHECK_FUNCS(pthread_atfork)
fi
+AC_SUBST(PYDOC)
@@ -62,11 +62,11 @@ Index: cpython/configure.ac
AC_SUBST(TEST_MODULES)
-Index: cpython/setup.py
+Index: b/setup.py
===================================================================
---- cpython.orig/setup.py
-+++ cpython/setup.py
-@@ -2123,6 +2123,12 @@
+--- a/setup.py
++++ b/setup.py
+@@ -2182,6 +2182,12 @@
# turn off warnings when deprecated modules are imported
import warnings
warnings.filterwarnings("ignore",category=DeprecationWarning)
@@ -79,7 +79,7 @@ Index: cpython/setup.py
setup(# PyPI Metadata (PEP 301)
name = "Python",
version = sys.version.split()[0],
-@@ -2147,8 +2153,7 @@
+@@ -2206,8 +2212,7 @@
# If you change the scripts installed here, you also need to
# check the PyBuildScripts command above, and change the links
# created by the bininstall target in Makefile.pre.in
diff --git a/package/python3/python3-102-optional-2to3.patch b/package/python3/python3-102-optional-2to3.patch
index f5e821a..facf6e1 100644
--- a/package/python3/python3-102-optional-2to3.patch
+++ b/package/python3/python3-102-optional-2to3.patch
@@ -12,11 +12,11 @@ Signed-off-by: Samuel Martin <s.martin49@gmail.com>
setup.py | 5 +++--
3 files changed, 23 insertions(+), 6 deletions(-)
-Index: cpython/Makefile.pre.in
+Index: b/Makefile.pre.in
===================================================================
---- cpython.orig/Makefile.pre.in
-+++ cpython/Makefile.pre.in
-@@ -956,7 +956,9 @@
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -1091,7 +1091,9 @@
(cd $(DESTDIR)$(BINDIR); $(LN) -s pydoc$(VERSION) pydoc3)
endif
-rm -f $(DESTDIR)$(BINDIR)/2to3
@@ -25,46 +25,44 @@ Index: cpython/Makefile.pre.in
+endif
-rm -f $(DESTDIR)$(BINDIR)/pyvenv
(cd $(DESTDIR)$(BINDIR); $(LN) -s pyvenv-$(VERSION) pyvenv)
-
-@@ -985,7 +987,6 @@
+ if test "x$(LIPO_32BIT_FLAGS)" != "x" ; then \
+@@ -1131,7 +1133,6 @@
html json http dbm xmlrpc \
sqlite3 \
logging csv wsgiref urllib \
- lib2to3 lib2to3/fixes lib2to3/pgen2 \
- ctypes ctypes/macholib idlelib idlelib/Icons \
+ ctypes ctypes/macholib \
+ idlelib idlelib/Icons \
distutils distutils/command $(XMLLIBSUBDIRS) \
- importlib \
-@@ -1025,9 +1026,6 @@
- test/test_email test/test_email/data \
- test/json_tests \
- sqlite3/test \
+@@ -1172,9 +1173,6 @@
+ test/namespace_pkgs/project3/parent/child \
+ test/namespace_pkgs/module_and_namespace_package \
+ test/namespace_pkgs/module_and_namespace_package/a_test \
- lib2to3/tests \
- lib2to3/tests/data lib2to3/tests/data/fixers \
- lib2to3/tests/data/fixers/myfixes \
- ctypes/test \
- distutils/tests \
+ sqlite3/test idlelib/idle_test \
test/test_importlib test/test_importlib/builtin \
-@@ -1040,6 +1038,16 @@
+ test/test_importlib/extension test/test_importlib/frozen \
+@@ -1186,6 +1184,14 @@
LIBSUBDIRS += pydoc_data
endif
+ifeq (@LIB2TO3@,yes)
+LIBSUBDIRS += lib2to3 lib2to3/fixes lib2to3/pgen2
-+ifeq (@TEST_MODULES@,yes)
-+LIBSUBDIRS += lib2to3/tests \
-+ lib2to3/tests/data \
-+ lib2to3/tests/data/fixers \
-+ lib2to3/tests/data/fixers/myfixes
-+endif
++TESTSUBDIRS += lib2to3/tests \
++ lib2to3/tests/data \
++ lib2to3/tests/data/fixers \
++ lib2to3/tests/data/fixers/myfixes
+endif
+
- libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
- @for i in $(SCRIPTDIR) $(LIBDEST); \
- do \
-@@ -1109,10 +1117,12 @@
- $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
- -d $(LIBDEST)/site-packages -f \
+ ifeq (@TEST_MODULES@,yes)
+ LIBSUBDIRS += $(TESTSUBDIRS)
+ endif
+@@ -1281,10 +1287,12 @@
+ -d $(LIBDEST)/site-packages -f $(STDLIB_CACHE_FLAGS) \
-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
+ endif
+ifeq (@LIB2TO3@,yes)
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
$(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
@@ -74,11 +72,11 @@ Index: cpython/Makefile.pre.in
# Create the PLATDIR source directory, if one wasn't distributed..
$(srcdir)/Lib/$(PLATDIR):
-Index: cpython/setup.py
+Index: b/setup.py
===================================================================
---- cpython.orig/setup.py
-+++ cpython/setup.py
-@@ -2124,10 +2124,11 @@
+--- a/setup.py
++++ b/setup.py
+@@ -2183,10 +2183,11 @@
import warnings
warnings.filterwarnings("ignore",category=DeprecationWarning)
@@ -92,11 +90,11 @@ Index: cpython/setup.py
setup(# PyPI Metadata (PEP 301)
name = "Python",
-Index: cpython/configure.ac
+Index: b/configure.ac
===================================================================
---- cpython.orig/configure.ac
-+++ cpython/configure.ac
-@@ -2460,6 +2460,12 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -2678,6 +2678,12 @@
AS_HELP_STRING([--disable-test-modules], [disable test modules]),
[ TEST_MODULES="${enableval}" ], [ TEST_MODULES=yes ])
diff --git a/package/python3/python3-103-optional-sqlite.patch b/package/python3/python3-103-optional-sqlite.patch
index e3a63c3..eb8d242 100644
--- a/package/python3/python3-103-optional-sqlite.patch
+++ b/package/python3/python3-103-optional-sqlite.patch
@@ -8,12 +8,12 @@ Signed-off-by: Samuel Martin <s.martin49@gmail.com>
configure.ac | 9 +++++++++
2 files changed, 16 insertions(+), 2 deletions(-)
-Index: cpython/configure.ac
+Index: b/configure.ac
===================================================================
---- cpython.orig/configure.ac
-+++ cpython/configure.ac
-@@ -2448,6 +2448,15 @@
- esac])
+--- a/configure.ac
++++ b/configure.ac
+@@ -2666,6 +2666,15 @@
+ AC_CHECK_FUNCS(pthread_atfork)
fi
+AC_SUBST(SQLITE3)
@@ -28,37 +28,36 @@ Index: cpython/configure.ac
AC_SUBST(PYDOC)
AC_ARG_ENABLE(pydoc,
-Index: cpython/Makefile.pre.in
+Index: b/Makefile.pre.in
===================================================================
---- cpython.orig/Makefile.pre.in
-+++ cpython/Makefile.pre.in
-@@ -985,7 +985,6 @@
- collections concurrent concurrent/futures encodings \
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -1131,7 +1131,6 @@
email email/mime \
+ ensurepip ensurepip/_bundled \
html json http dbm xmlrpc \
- sqlite3 \
logging csv wsgiref urllib \
- ctypes ctypes/macholib idlelib idlelib/Icons \
- distutils distutils/command $(XMLLIBSUBDIRS) \
-@@ -1025,7 +1024,6 @@
- test/namespace_pkgs/module_and_namespace_package/a_test \
- test/test_email test/test_email/data \
- test/json_tests \
-- sqlite3/test \
- ctypes/test \
- distutils/tests \
+ ctypes ctypes/macholib \
+ idlelib idlelib/Icons \
+@@ -1173,7 +1172,7 @@
+ test/namespace_pkgs/project3/parent/child \
+ test/namespace_pkgs/module_and_namespace_package \
+ test/namespace_pkgs/module_and_namespace_package/a_test \
+- sqlite3/test idlelib/idle_test \
++ idlelib/idle_test \
test/test_importlib test/test_importlib/builtin \
-@@ -1048,6 +1046,13 @@
- endif
+ test/test_importlib/extension test/test_importlib/frozen \
+ test/test_importlib/import_ test/test_importlib/source \
+@@ -1192,6 +1191,11 @@
+ lib2to3/tests/data/fixers/myfixes
endif
+ifeq (@SQLITE3@,yes)
+LIBSUBDIRS += sqlite3
-+ifeq (@TEST_MODULES@,yes)
-+LIBSUBDIRS += sqlite3/test
-+endif
++TESTSUBDIRS += sqlite3/test
+endif
+
- libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
- @for i in $(SCRIPTDIR) $(LIBDEST); \
- do \
+ ifeq (@TEST_MODULES@,yes)
+ LIBSUBDIRS += $(TESTSUBDIRS)
+ endif
diff --git a/package/python3/python3-104-optional-tk.patch b/package/python3/python3-104-optional-tk.patch
index 2f89fe0..32e2bee 100644
--- a/package/python3/python3-104-optional-tk.patch
+++ b/package/python3/python3-104-optional-tk.patch
@@ -8,50 +8,47 @@ Signed-off-by: Samuel Martin <s.martin49@gmail.com>
configure.ac | 9 +++++++++
2 files changed, 20 insertions(+), 3 deletions(-)
-Index: cpython/Makefile.pre.in
+Index: b/Makefile.pre.in
===================================================================
---- cpython.orig/Makefile.pre.in
-+++ cpython/Makefile.pre.in
-@@ -980,7 +980,7 @@
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -1124,7 +1124,7 @@
EXTRAPLATDIR= @EXTRAPLATDIR@
MACHDEPS= $(PLATDIR) $(EXTRAPLATDIR)
XMLLIBSUBDIRS= xml xml/dom xml/etree xml/parsers xml/sax
-LIBSUBDIRS= tkinter \
+LIBSUBDIRS= \
site-packages \
+ asyncio \
collections concurrent concurrent/futures encodings \
- email email/mime \
-@@ -996,8 +996,7 @@
+@@ -1142,8 +1142,7 @@
+ venv venv/scripts venv/scripts/posix \
curses $(MACHDEPS)
- ifeq (@TEST_MODULES@,yes)
--LIBSUBDIRS += tkinter/test tkinter/test/test_tkinter \
-- tkinter/test/test_ttk test \
-+LIBSUBDIRS += test \
- test/capath test/data \
- test/cjkencodings test/decimaltestdata test/xmltestdata \
- test/subprocessdata test/sndhdrdata \
-@@ -1053,6 +1052,15 @@
- endif
+-TESTSUBDIRS = tkinter/test tkinter/test/test_tkinter tkinter/test/test_ttk \
+- test test/test_asyncio ctypes/test \
++TESTSUBDIRS = test test/test_asyncio ctypes/test \
+ test/test_email test/test_email/data \
+ test/test_json \
+ test/audiodata \
+@@ -1196,6 +1195,12 @@
+ TESTSUBDIRS += sqlite3/test
endif
+ifeq (@TK@,yes)
+LIBSUBDIRS += tkinter
-+ifeq (@TEST_MODULES@,yes)
-+LIBSUBDIRS += \
-+ tkinter/test tkinter/test/test_tkinter \
-+ tkinter/test/test_ttk
-+endif
++TESTSUBDIRS += tkinter/test tkinter/test/test_tkinter \
++ tkinter/test/test_ttk
+endif
+
- libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
- @for i in $(SCRIPTDIR) $(LIBDEST); \
- do \
-Index: cpython/configure.ac
+ ifeq (@TEST_MODULES@,yes)
+ LIBSUBDIRS += $(TESTSUBDIRS)
+ endif
+Index: b/configure.ac
===================================================================
---- cpython.orig/configure.ac
-+++ cpython/configure.ac
-@@ -2457,6 +2457,15 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -2675,6 +2675,15 @@
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _sqlite3"
fi
diff --git a/package/python3/python3-105-optional-curses.patch b/package/python3/python3-105-optional-curses.patch
index adb3183..75e2558 100644
--- a/package/python3/python3-105-optional-curses.patch
+++ b/package/python3/python3-105-optional-curses.patch
@@ -8,35 +8,35 @@ Signed-off-by: Samuel Martin <s.martin49@gmail.com>
configure.ac | 9 +++++++++
2 files changed, 14 insertions(+), 1 deletion(-)
-Index: cpython/Makefile.pre.in
+Index: b/Makefile.pre.in
===================================================================
---- cpython.orig/Makefile.pre.in
-+++ cpython/Makefile.pre.in
-@@ -993,7 +993,7 @@
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -1140,7 +1140,7 @@
multiprocessing multiprocessing/dummy \
unittest \
venv venv/scripts venv/scripts/posix \
- curses $(MACHDEPS)
+ $(MACHDEPS)
- ifeq (@TEST_MODULES@,yes)
- LIBSUBDIRS += test \
-@@ -1061,6 +1061,10 @@
- endif
+ TESTSUBDIRS = test test/test_asyncio ctypes/test \
+ test/test_email test/test_email/data \
+@@ -1201,6 +1201,10 @@
+ tkinter/test/test_ttk
endif
+ifeq (@CURSES@,yes)
+LIBSUBDIRS += curses
+endif
+
- libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
- @for i in $(SCRIPTDIR) $(LIBDEST); \
- do \
-Index: cpython/configure.ac
+ ifeq (@TEST_MODULES@,yes)
+ LIBSUBDIRS += $(TESTSUBDIRS)
+ endif
+Index: b/configure.ac
===================================================================
---- cpython.orig/configure.ac
-+++ cpython/configure.ac
-@@ -2466,6 +2466,15 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -2684,6 +2684,15 @@
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _tkinter"
fi
diff --git a/package/python3/python3-106-optional-expat.patch b/package/python3/python3-106-optional-expat.patch
index d171b79..80da939 100644
--- a/package/python3/python3-106-optional-expat.patch
+++ b/package/python3/python3-106-optional-expat.patch
@@ -15,20 +15,20 @@ Signed-off-by: Samuel Martin <s.martin49@gmail.com>
setup.py | 2 +-
3 files changed, 19 insertions(+), 7 deletions(-)
-Index: cpython/Makefile.pre.in
+Index: b/Makefile.pre.in
===================================================================
---- cpython.orig/Makefile.pre.in
-+++ cpython/Makefile.pre.in
-@@ -987,7 +987,7 @@
- html json http dbm xmlrpc \
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -1134,7 +1134,7 @@
logging csv wsgiref urllib \
- ctypes ctypes/macholib idlelib idlelib/Icons \
+ ctypes ctypes/macholib \
+ idlelib idlelib/Icons \
- distutils distutils/command $(XMLLIBSUBDIRS) \
+ distutils distutils/command \
importlib \
turtledemo \
multiprocessing multiprocessing/dummy \
-@@ -1065,6 +1065,10 @@
+@@ -1205,6 +1205,10 @@
LIBSUBDIRS += curses
endif
@@ -36,14 +36,14 @@ Index: cpython/Makefile.pre.in
+LIBSUBDIRS += $(XMLLIBSUBDIRS)
+endif
+
- libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
- @for i in $(SCRIPTDIR) $(LIBDEST); \
- do \
-Index: cpython/configure.ac
+ ifeq (@TEST_MODULES@,yes)
+ LIBSUBDIRS += $(TESTSUBDIRS)
+ endif
+Index: b/configure.ac
===================================================================
---- cpython.orig/configure.ac
-+++ cpython/configure.ac
-@@ -2178,13 +2178,21 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -2363,13 +2363,21 @@
AC_SUBST(DISABLED_EXTENSIONS)
# Check for use of the system expat library
@@ -70,11 +70,11 @@ Index: cpython/configure.ac
# Check for use of the system libffi library
AC_MSG_CHECKING(for --with-system-ffi)
-Index: cpython/setup.py
+Index: b/setup.py
===================================================================
---- cpython.orig/setup.py
-+++ cpython/setup.py
-@@ -1404,7 +1404,7 @@
+--- a/setup.py
++++ b/setup.py
+@@ -1396,7 +1396,7 @@
#
# More information on Expat can be found at www.libexpat.org.
#
diff --git a/package/python3/python3-107-optional-codecs-cjk.patch b/package/python3/python3-107-optional-codecs-cjk.patch
index de7f910..f9d377d 100644
--- a/package/python3/python3-107-optional-codecs-cjk.patch
+++ b/package/python3/python3-107-optional-codecs-cjk.patch
@@ -6,11 +6,11 @@ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
configure.ac | 6 ++++++
1 file changed, 6 insertions(+)
-Index: cpython/configure.ac
+Index: b/configure.ac
===================================================================
---- cpython.orig/configure.ac
-+++ cpython/configure.ac
-@@ -2465,6 +2465,12 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -2683,6 +2683,12 @@
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _sqlite3"
fi
diff --git a/package/python3/python3-108-optional-nis.patch b/package/python3/python3-108-optional-nis.patch
index 3c91497..7ec5b19 100644
--- a/package/python3/python3-108-optional-nis.patch
+++ b/package/python3/python3-108-optional-nis.patch
@@ -9,11 +9,11 @@ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
configure.ac | 6 ++++++
1 file changed, 6 insertions(+)
-Index: cpython/configure.ac
+Index: b/configure.ac
===================================================================
---- cpython.orig/configure.ac
-+++ cpython/configure.ac
-@@ -2471,6 +2471,12 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -2689,6 +2689,12 @@
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _codecs_kr _codecs_jp _codecs_cn _codecs_tw _codecs_hk _codecs_iso2022"
fi])
diff --git a/package/python3/python3-109-optional-unicodedata.patch b/package/python3/python3-109-optional-unicodedata.patch
index c75ee27..4b671ed 100644
--- a/package/python3/python3-109-optional-unicodedata.patch
+++ b/package/python3/python3-109-optional-unicodedata.patch
@@ -6,11 +6,11 @@ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
configure.ac | 6 ++++++
1 file changed, 6 insertions(+)
-Index: cpython/configure.ac
+Index: b/configure.ac
===================================================================
---- cpython.orig/configure.ac
-+++ cpython/configure.ac
-@@ -2477,6 +2477,12 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -2695,6 +2695,12 @@
DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} nis"
fi])
diff --git a/package/python3/python3-110-optional-idle.patch b/package/python3/python3-110-optional-idle.patch
index 1a7fa65..f657cbd 100644
--- a/package/python3/python3-110-optional-idle.patch
+++ b/package/python3/python3-110-optional-idle.patch
@@ -11,11 +11,11 @@ Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
setup.py | 4 +++-
3 files changed, 16 insertions(+), 2 deletions(-)
-Index: cpython/Makefile.pre.in
+Index: b/Makefile.pre.in
===================================================================
---- cpython.orig/Makefile.pre.in
-+++ cpython/Makefile.pre.in
-@@ -950,7 +950,9 @@
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -1085,7 +1085,9 @@
-rm -f $(DESTDIR)$(LIBPC)/python3.pc
(cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION).pc python3.pc)
-rm -f $(DESTDIR)$(BINDIR)/idle3
@@ -25,16 +25,15 @@ Index: cpython/Makefile.pre.in
-rm -f $(DESTDIR)$(BINDIR)/pydoc3
ifeq (@PYDOC@,yes)
(cd $(DESTDIR)$(BINDIR); $(LN) -s pydoc$(VERSION) pydoc3)
-@@ -986,7 +988,7 @@
- email email/mime \
+@@ -1133,7 +1135,6 @@
html json http dbm xmlrpc \
logging csv wsgiref urllib \
-- ctypes ctypes/macholib idlelib idlelib/Icons \
-+ ctypes ctypes/macholib \
+ ctypes ctypes/macholib \
+- idlelib idlelib/Icons \
distutils distutils/command \
importlib \
turtledemo \
-@@ -1069,6 +1071,10 @@
+@@ -1209,6 +1210,10 @@
LIBSUBDIRS += $(XMLLIBSUBDIRS)
endif
@@ -42,14 +41,14 @@ Index: cpython/Makefile.pre.in
+LIBSUBDIRS += idlelib idlelib/Icons
+endif
+
- libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
- @for i in $(SCRIPTDIR) $(LIBDEST); \
- do \
-Index: cpython/configure.ac
+ ifeq (@TEST_MODULES@,yes)
+ LIBSUBDIRS += $(TESTSUBDIRS)
+ endif
+Index: b/configure.ac
===================================================================
---- cpython.orig/configure.ac
-+++ cpython/configure.ac
-@@ -2519,6 +2519,12 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -2737,6 +2737,12 @@
AS_HELP_STRING([--disable-lib2to3], [disable lib2to3]),
[ LIB2TO3="${enableval}" ], [ LIB2TO3=yes ])
@@ -62,11 +61,11 @@ Index: cpython/configure.ac
# Check for enable-ipv6
AH_TEMPLATE(ENABLE_IPV6, [Define if --enable-ipv6 is specified])
AC_MSG_CHECKING([if --enable-ipv6 is specified])
-Index: cpython/setup.py
+Index: b/setup.py
===================================================================
---- cpython.orig/setup.py
-+++ cpython/setup.py
-@@ -2124,11 +2124,13 @@
+--- a/setup.py
++++ b/setup.py
+@@ -2183,11 +2183,13 @@
import warnings
warnings.filterwarnings("ignore",category=DeprecationWarning)
diff --git a/package/python3/python3.mk b/package/python3/python3.mk
index 477bdfb..232862a 100644
--- a/package/python3/python3.mk
+++ b/package/python3/python3.mk
@@ -4,10 +4,11 @@
#
################################################################################
-PYTHON3_VERSION_MAJOR = 3.3
-PYTHON3_VERSION = $(PYTHON3_VERSION_MAJOR).0
+PYTHON3_VERSION_MAJOR = 3.4
+PYTHON3_VERSION_MINOR = 0
+PYTHON3_VERSION = $(PYTHON3_VERSION_MAJOR).$(PYTHON3_VERSION_MINOR)rc1
PYTHON3_SOURCE = Python-$(PYTHON3_VERSION).tar.xz
-PYTHON3_SITE = http://python.org/ftp/python/$(PYTHON3_VERSION)
+PYTHON3_SITE = http://python.org/ftp/python/$(PYTHON3_VERSION_MAJOR).$(PYTHON3_VERSION_MINOR)
# Python needs itself and a "pgen" program to build itself, both being
# provided in the Python sources. So in order to cross-compile Python,
@@ -16,6 +17,7 @@ PYTHON3_SITE = http://python.org/ftp/python/$(PYTHON3_VERSION)
# third-party Python modules.
HOST_PYTHON3_CONF_OPT += \
+ --without-ensurepip \
--without-cxx-main \
--disable-sqlite3 \
--disable-tk \
@@ -25,25 +27,8 @@ HOST_PYTHON3_CONF_OPT += \
--disable-nis \
--disable-unicodedata \
--disable-test-modules \
- --disable-idle3
-
-HOST_PYTHON3_MAKE_ENV = \
- PYTHON_MODULES_INCLUDE=$(HOST_DIR)/usr/include \
- PYTHON_MODULES_LIB="$(HOST_DIR)/lib $(HOST_DIR)/usr/lib"
-
-
-define HOST_PYTHON3_CONFIGURE_CMDS
- (cd $(@D) && rm -rf config.cache; \
- $(HOST_CONFIGURE_OPTS) \
- CFLAGS="$(HOST_CFLAGS)" \
- LDFLAGS="$(HOST_LDFLAGS)" \
- $(HOST_PYTHON3_CONF_ENV) \
- ./configure \
- --prefix="$(HOST_DIR)/usr" \
- --sysconfdir="$(HOST_DIR)/etc" \
- $(HOST_PYTHON3_CONF_OPT) \
- )
-endef
+ --disable-idle3 \
+ --disable-pyo-build
PYTHON3_DEPENDENCIES = host-python3 libffi
@@ -72,6 +57,10 @@ ifeq ($(BR2_PACKAGE_PYTHON3_PYC_ONLY),y)
PYTHON3_CONF_OPT += --enable-old-stdlib-cache
endif
+ifeq ($(BR2_PACKAGE_PYTHON3_PY_ONLY),y)
+PYTHON3_CONF_OPT += --disable-pyc-build
+endif
+
ifeq ($(BR2_PACKAGE_PYTHON3_SQLITE),y)
PYTHON3_DEPENDENCIES += sqlite
else
@@ -99,15 +88,12 @@ PYTHON3_DEPENDENCIES += zlib
endif
PYTHON3_CONF_ENV += \
- _PROJECT_BASE=$(PYTHON3_DIR) \
- _PYTHON_HOST_PLATFORM=$(BR2_HOSTARCH) \
- PYTHON_FOR_BUILD=$(HOST_PYTHON3_DIR)/python \
- PGEN_FOR_BUILD=$(HOST_PYTHON3_DIR)/Parser/pgen \
ac_cv_have_long_long_format=yes \
ac_cv_file__dev_ptmx=yes \
ac_cv_file__dev_ptc=yes \
PYTHON3_CONF_OPT += \
+ --without-ensurepip \
--without-cxx-main \
--with-system-ffi \
--disable-pydoc \
@@ -115,22 +101,18 @@ PYTHON3_CONF_OPT += \
--disable-lib2to3 \
--disable-tk \
--disable-nis \
- --disable-idle3
-
-PYTHON3_MAKE_ENV = \
- _PROJECT_BASE=$(PYTHON3_DIR) \
- _PYTHON_HOST_PLATFORM=$(BR2_HOSTARCH) \
- PYTHON_MODULES_INCLUDE=$(STAGING_DIR)/usr/include \
- PYTHON_MODULES_LIB="$(STAGING_DIR)/lib $(STAGING_DIR)/usr/lib"
-
-# python distutils adds -L$LIBDIR when linking binary extensions, causing
-# trouble for cross compilation
-define PYTHON3_FIXUP_LIBDIR
- $(SED) 's|^LIBDIR=.*|LIBDIR= $(STAGING_DIR)/usr/lib|' \
- $(STAGING_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/config-$(PYTHON3_VERSION_MAJOR)m/Makefile
+ --disable-idle3 \
+ --disable-pyo-build
+
+# This is needed to make sure the Python build process doesn't try to
+# regenerate those files with the pgen program. Otherwise, it builds
+# pgen for the target, and tries to run it on the host.
+
+define PYTHON3_TOUCH_GRAMMAR_FILES
+ touch $(@D)/Include/graminit.h $(@D)/Python/graminit.c
endef
-PYTHON3_POST_INSTALL_STAGING_HOOKS += PYTHON3_FIXUP_LIBDIR
+PYTHON3_POST_PATCH_HOOKS += PYTHON3_TOUCH_GRAMMAR_FILES
#
# Remove useless files. In the config/ directory, only the Makefile
--
1.8.3.2
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [Buildroot] [PATCHv1 15/26] python3: provide a PYTHON3_PATH
2014-02-13 20:48 [Buildroot] [PATCHv1 00/26] Python 2 and 3 bumps, support for Python 3 external modules Thomas Petazzoni
` (13 preceding siblings ...)
2014-02-13 20:49 ` [Buildroot] [PATCHv1 14/26] python3: bump to 3.4.0rc1 Thomas Petazzoni
@ 2014-02-13 20:49 ` Thomas Petazzoni
2014-02-13 20:49 ` [Buildroot] [PATCHv1 16/26] package: add python3 support in the package infrastructure Thomas Petazzoni
` (11 subsequent siblings)
26 siblings, 0 replies; 36+ messages in thread
From: Thomas Petazzoni @ 2014-02-13 20:49 UTC (permalink / raw)
To: buildroot
The Python package infrastructure will need the Python 3 package to
provide a PYTHON3_PATH environment variable in order to build
third-party Python modules.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/python3/python3.mk | 3 +++
1 file changed, 3 insertions(+)
diff --git a/package/python3/python3.mk b/package/python3/python3.mk
index 232862a..8bf9518 100644
--- a/package/python3/python3.mk
+++ b/package/python3/python3.mk
@@ -156,5 +156,8 @@ HOST_PYTHON3_POST_INSTALL_HOOKS += \
HOST_PYTHON3_INSTALL_SYMLINK \
HOST_PYTHON3_INSTALL_CONFIG_SYMLINK
+# Provided to other packages
+PYTHON3_PATH = $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/sysconfigdata/:$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages/
+
$(eval $(autotools-package))
$(eval $(host-autotools-package))
--
1.8.3.2
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [Buildroot] [PATCHv1 16/26] package: add python3 support in the package infrastructure
2014-02-13 20:48 [Buildroot] [PATCHv1 00/26] Python 2 and 3 bumps, support for Python 3 external modules Thomas Petazzoni
` (14 preceding siblings ...)
2014-02-13 20:49 ` [Buildroot] [PATCHv1 15/26] python3: provide a PYTHON3_PATH Thomas Petazzoni
@ 2014-02-13 20:49 ` Thomas Petazzoni
2014-02-13 20:49 ` [Buildroot] [PATCHv1 17/26] package: allow Python packages with Python3 Thomas Petazzoni
` (10 subsequent siblings)
26 siblings, 0 replies; 36+ messages in thread
From: Thomas Petazzoni @ 2014-02-13 20:49 UTC (permalink / raw)
To: buildroot
This commit improves the Python package infrastructure to allow Python
packages to be built with Python 3. The changes are fairly simple:
* Use either PYTHON_PATH or PYTHON3_PATH as the PYTHONPATH depending
on which Python is used.
* Depend on host-python or host-python3 and python or python3
depending on which Python is used.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/pkg-python.mk | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/package/pkg-python.mk b/package/pkg-python.mk
index c4bbb37..a265862 100644
--- a/package/pkg-python.mk
+++ b/package/pkg-python.mk
@@ -27,7 +27,7 @@ PKG_PYTHON_DISTUTILS_ENV = \
CFLAGS="$(TARGET_CFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS)" \
LDSHARED="$(TARGET_CROSS)gcc -shared" \
- PYTHONPATH="$(PYTHON_PATH)" \
+ PYTHONPATH="$(if $(BR2_PACKAGE_PYTHON3),$(PYTHON3_PATH),$(PYTHON_PATH))" \
_python_sysroot=$(STAGING_DIR) \
_python_prefix=/usr \
_python_exec_prefix=/usr
@@ -48,7 +48,7 @@ HOST_PKG_PYTHON_DISTUTILS_INSTALL_OPT = \
# Target setuptools-based packages
PKG_PYTHON_SETUPTOOLS_ENV = \
PATH="$(TARGET_PATH)" \
- PYTHONPATH="$(PYTHON_PATH)" \
+ PYTHONPATH="$(if $(BR2_PACKAGE_PYTHON3),$(PYTHON3_PATH),$(PYTHON_PATH))" \
_python_sysroot=$(STAGING_DIR) \
_python_prefix=/usr \
_python_exec_prefix=/usr
@@ -138,16 +138,16 @@ endif
# depending on the package characteristics, and shouldn't be derived
# automatically from the dependencies of the corresponding target
# package.
-$(2)_DEPENDENCIES ?= $(filter-out host-python host-python-setuptools $(1),$(patsubst host-host-%,host-%,$(addprefix host-,$($(3)_DEPENDENCIES))))
+$(2)_DEPENDENCIES ?= $(filter-out host-python host-python3 host-python-setuptools $(1),$(patsubst host-host-%,host-%,$(addprefix host-,$($(3)_DEPENDENCIES))))
# Target packages need both the python interpreter on the target (for
# runtime) and the python interpreter on the host (for
# compilation). However, host packages only need the python
# interpreter on the host.
ifeq ($(4),target)
-$(2)_DEPENDENCIES += host-python python
+$(2)_DEPENDENCIES += $(if $(BR2_PACKAGE_PYTHON3),host-python3 python3,host-python python)
else
-$(2)_DEPENDENCIES += host-python
+$(2)_DEPENDENCIES += $(if $(BR2_PACKAGE_PYTHON3),host-python3,host-python)
endif
# Setuptools based packages will need host-python-setuptools (both
--
1.8.3.2
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [Buildroot] [PATCHv1 17/26] package: allow Python packages with Python3
2014-02-13 20:48 [Buildroot] [PATCHv1 00/26] Python 2 and 3 bumps, support for Python 3 external modules Thomas Petazzoni
` (15 preceding siblings ...)
2014-02-13 20:49 ` [Buildroot] [PATCHv1 16/26] package: add python3 support in the package infrastructure Thomas Petazzoni
@ 2014-02-13 20:49 ` Thomas Petazzoni
2014-02-13 20:49 ` [Buildroot] [PATCHv1 18/26] python, python3: enable unicodedata for host-python, needed by setuptools Thomas Petazzoni
` (9 subsequent siblings)
26 siblings, 0 replies; 36+ messages in thread
From: Thomas Petazzoni @ 2014-02-13 20:49 UTC (permalink / raw)
To: buildroot
Until now, Python external modules were only visible when Python 2.x
was selected. With this commit, we now source all the Config.in files
of Python external modules, as soon as one of the two Python
interpreters is enabled.
Since all Python external modules have a "depends on
BR2_PACKAGE_PYTHON" in their Config.in, this commit in practice does
not allow to enable any Python external module. However, thanks to
this, we can progressively and safely enable more and more Python
external modules to build with Python 3, by simply changing their
dependency to "depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3".
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/Config.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/package/Config.in b/package/Config.in
index fca61d6..fe2acf9 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -395,7 +395,8 @@ endmenu
endif
source "package/php/Config.in"
source "package/python/Config.in"
-if BR2_PACKAGE_PYTHON
+source "package/python3/Config.in"
+if BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3
menu "external python modules"
source "package/python-bottle/Config.in"
source "package/python-configobj/Config.in"
@@ -431,7 +432,6 @@ source "package/python-tornado/Config.in"
source "package/python-versiontools/Config.in"
endmenu
endif
-source "package/python3/Config.in"
source "package/ruby/Config.in"
source "package/tcl/Config.in"
if BR2_PACKAGE_TCL
--
1.8.3.2
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [Buildroot] [PATCHv1 18/26] python, python3: enable unicodedata for host-python, needed by setuptools
2014-02-13 20:48 [Buildroot] [PATCHv1 00/26] Python 2 and 3 bumps, support for Python 3 external modules Thomas Petazzoni
` (16 preceding siblings ...)
2014-02-13 20:49 ` [Buildroot] [PATCHv1 17/26] package: allow Python packages with Python3 Thomas Petazzoni
@ 2014-02-13 20:49 ` Thomas Petazzoni
2014-02-13 20:49 ` [Buildroot] [PATCHv1 19/26] python-setuptools: bump version to 2.1.2 Thomas Petazzoni
` (8 subsequent siblings)
26 siblings, 0 replies; 36+ messages in thread
From: Thomas Petazzoni @ 2014-02-13 20:49 UTC (permalink / raw)
To: buildroot
As we are going to bump setuptools to a much newer version, the host
python needs to be built with support for unicodedata.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/python/python.mk | 2 +-
package/python3/python3.mk | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/package/python/python.mk b/package/python/python.mk
index 0469820..3b0a4dd 100644
--- a/package/python/python.mk
+++ b/package/python/python.mk
@@ -25,7 +25,7 @@ HOST_PYTHON_CONF_OPT += \
--disable-curses \
--disable-codecs-cjk \
--disable-nis \
- --disable-unicodedata \
+ --enable-unicodedata \
--disable-dbm \
--disable-gdbm \
--disable-bsddb \
diff --git a/package/python3/python3.mk b/package/python3/python3.mk
index 8bf9518..62642c8 100644
--- a/package/python3/python3.mk
+++ b/package/python3/python3.mk
@@ -25,7 +25,7 @@ HOST_PYTHON3_CONF_OPT += \
--disable-curses \
--disable-codecs-cjk \
--disable-nis \
- --disable-unicodedata \
+ --enable-unicodedata \
--disable-test-modules \
--disable-idle3 \
--disable-pyo-build
--
1.8.3.2
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [Buildroot] [PATCHv1 19/26] python-setuptools: bump version to 2.1.2
2014-02-13 20:48 [Buildroot] [PATCHv1 00/26] Python 2 and 3 bumps, support for Python 3 external modules Thomas Petazzoni
` (17 preceding siblings ...)
2014-02-13 20:49 ` [Buildroot] [PATCHv1 18/26] python, python3: enable unicodedata for host-python, needed by setuptools Thomas Petazzoni
@ 2014-02-13 20:49 ` Thomas Petazzoni
2014-02-13 20:49 ` [Buildroot] [PATCHv1 20/26] python, python3: fix to ensure libpython is stripped Thomas Petazzoni
` (7 subsequent siblings)
26 siblings, 0 replies; 36+ messages in thread
From: Thomas Petazzoni @ 2014-02-13 20:49 UTC (permalink / raw)
To: buildroot
From: Rohan Fletcher <rohfledev@gmail.com>
[Thomas: bump to 2.1.2 instead of 0.8, remove comment that no longer
made sense about setuptools being forked.]
Signed-off-by: Rohan Fletcher <rohfledev@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/python-setuptools/python-setuptools.mk | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/package/python-setuptools/python-setuptools.mk b/package/python-setuptools/python-setuptools.mk
index 13df448..48bf7c5 100644
--- a/package/python-setuptools/python-setuptools.mk
+++ b/package/python-setuptools/python-setuptools.mk
@@ -4,14 +4,9 @@
#
################################################################################
-# "distribute" is a fork of the unmaintained setuptools package. There
-# are plans to re-merge it into setuptools; if this happens, we can
-# switch back to it.
-# See http://pypi.python.org/packages/source/s/setuptools
-
-PYTHON_SETUPTOOLS_VERSION = 0.6.36
-PYTHON_SETUPTOOLS_SOURCE = distribute-$(PYTHON_SETUPTOOLS_VERSION).tar.gz
-PYTHON_SETUPTOOLS_SITE = http://pypi.python.org/packages/source/d/distribute
+PYTHON_SETUPTOOLS_VERSION = 2.1.2
+PYTHON_SETUPTOOLS_SOURCE = setuptools-$(PYTHON_SETUPTOOLS_VERSION).tar.gz
+PYTHON_SETUPTOOLS_SITE = http://pypi.python.org/packages/source/s/setuptools
PYTHON_SETUPTOOLS_SETUP_TYPE = setuptools
$(eval $(python-package))
--
1.8.3.2
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [Buildroot] [PATCHv1 20/26] python, python3: fix to ensure libpython is stripped
2014-02-13 20:48 [Buildroot] [PATCHv1 00/26] Python 2 and 3 bumps, support for Python 3 external modules Thomas Petazzoni
` (18 preceding siblings ...)
2014-02-13 20:49 ` [Buildroot] [PATCHv1 19/26] python-setuptools: bump version to 2.1.2 Thomas Petazzoni
@ 2014-02-13 20:49 ` Thomas Petazzoni
2014-02-13 20:49 ` [Buildroot] [PATCHv1 21/26] python-pyasn: use the real upstream Thomas Petazzoni
` (6 subsequent siblings)
26 siblings, 0 replies; 36+ messages in thread
From: Thomas Petazzoni @ 2014-02-13 20:49 UTC (permalink / raw)
To: buildroot
From: Przemyslaw Wrzos <przemyslaw.wrzos@calyptech.com>
The python and python3 builds mark libpython as read-only which
prevents it from being stripped out correctly for the target.
Signed-off-by: Przemyslaw Wrzos <przemyslaw.wrzos@calyptech.com>
Acked-by: Thomas De Schampheleire <thomas.de_schampheleire@alcatel-lucent.com>
Tested-by: Thomas De Schampheleire <thomas.de_schampheleire@alcatel-lucent.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/python/python.mk | 9 +++++++++
package/python3/python3.mk | 9 +++++++++
2 files changed, 18 insertions(+)
diff --git a/package/python/python.mk b/package/python/python.mk
index 3b0a4dd..94765cb 100644
--- a/package/python/python.mk
+++ b/package/python/python.mk
@@ -160,6 +160,15 @@ endef
PYTHON_POST_INSTALL_TARGET_HOOKS += PYTHON_REMOVE_USELESS_FILES
+#
+# Make sure libpython gets stripped out on target
+#
+define PYTHON_ENSURE_LIBPYTHON_STRIPPED
+ chmod u+w $(TARGET_DIR)/usr/lib/libpython$(PYTHON_VERSION_MAJOR)*.so
+endef
+
+PYTHON_POST_INSTALL_TARGET_HOOKS += PYTHON_ENSURE_LIBPYTHON_STRIPPED
+
PYTHON_AUTORECONF = YES
# Provided to other packages
diff --git a/package/python3/python3.mk b/package/python3/python3.mk
index 62642c8..2d9d1f2 100644
--- a/package/python3/python3.mk
+++ b/package/python3/python3.mk
@@ -131,6 +131,15 @@ endef
PYTHON3_POST_INSTALL_TARGET_HOOKS += PYTHON3_REMOVE_USELESS_FILES
+#
+# Make sure libpython gets stripped out on target
+#
+define PYTHON3_ENSURE_LIBPYTHON_STRIPPED
+ chmod u+w $(TARGET_DIR)/usr/lib/libpython$(PYTHON3_VERSION_MAJOR)*.so
+endef
+
+PYTHON3_POST_INSTALL_TARGET_HOOKS += PYTHON3_ENSURE_LIBPYTHON_STRIPPED
+
PYTHON3_AUTORECONF = YES
define PYTHON3_INSTALL_SYMLINK
--
1.8.3.2
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [Buildroot] [PATCHv1 21/26] python-pyasn: use the real upstream
2014-02-13 20:48 [Buildroot] [PATCHv1 00/26] Python 2 and 3 bumps, support for Python 3 external modules Thomas Petazzoni
` (19 preceding siblings ...)
2014-02-13 20:49 ` [Buildroot] [PATCHv1 20/26] python, python3: fix to ensure libpython is stripped Thomas Petazzoni
@ 2014-02-13 20:49 ` Thomas Petazzoni
2014-02-13 20:49 ` [Buildroot] [PATCHv1 22/26] python-bottle: allow to build with Python 3 Thomas Petazzoni
` (5 subsequent siblings)
26 siblings, 0 replies; 36+ messages in thread
From: Thomas Petazzoni @ 2014-02-13 20:49 UTC (permalink / raw)
To: buildroot
The https://code.google.com/p/pyasn/ project is not really the real
upstream for PyASN, and at least not the upstream for the PyASN
implementation recommended by the PySNMP developers.
Instead, the real upstream is
https://pypi.python.org/packages/source/p/pyasn1/, which has had much
more regular releases than the other PyASN implementation.
Therefore, we switch to using this implementation, as recommended by
the PySNMP developers on http://pysnmp.sourceforge.net/download.html.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/python-pyasn/python-pyasn.mk | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/package/python-pyasn/python-pyasn.mk b/package/python-pyasn/python-pyasn.mk
index b007222..43fabe9 100644
--- a/package/python-pyasn/python-pyasn.mk
+++ b/package/python-pyasn/python-pyasn.mk
@@ -4,16 +4,10 @@
#
################################################################################
-PYTHON_PYASN_VERSION = 1.2
-PYTHON_PYASN_SOURCE = PyASN-$(PYTHON_PYASN_VERSION).zip
-PYTHON_PYASN_SITE = https://pyasn.googlecode.com/files
+PYTHON_PYASN_VERSION = 0.17
+PYTHON_PYASN_SOURCE = pyasn1-$(PYTHON_PYASN_VERSION).tar.gz
+PYTHON_PYASN_SITE = https://pypi.python.org/packages/source/p/pyasn1/
PYTHON_PYASN_LICENSE = LGPLv3+ (pyasn.cpp), GPLv2+ (libgds)
PYTHON_PYASN_SETUP_TYPE = distutils
-define PYTHON_PYASN_EXTRACT_CMDS
- unzip -d $(@D) $(DL_DIR)/$(PYTHON_PYASN_SOURCE)
- mv $(@D)/PyASN-$(PYTHON_PYASN_VERSION)/* $(@D)
- $(RM) -r $(@D)/PyASN-$(PYTHON_PYASN_VERSION)
-endef
-
$(eval $(python-package))
--
1.8.3.2
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [Buildroot] [PATCHv1 22/26] python-bottle: allow to build with Python 3
2014-02-13 20:48 [Buildroot] [PATCHv1 00/26] Python 2 and 3 bumps, support for Python 3 external modules Thomas Petazzoni
` (20 preceding siblings ...)
2014-02-13 20:49 ` [Buildroot] [PATCHv1 21/26] python-pyasn: use the real upstream Thomas Petazzoni
@ 2014-02-13 20:49 ` Thomas Petazzoni
2014-02-13 20:49 ` [Buildroot] [PATCHv1 23/26] python-serial: " Thomas Petazzoni
` (4 subsequent siblings)
26 siblings, 0 replies; 36+ messages in thread
From: Thomas Petazzoni @ 2014-02-13 20:49 UTC (permalink / raw)
To: buildroot
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/python-bottle/Config.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/python-bottle/Config.in b/package/python-bottle/Config.in
index 07f490c..7b13c1d 100644
--- a/package/python-bottle/Config.in
+++ b/package/python-bottle/Config.in
@@ -1,6 +1,6 @@
config BR2_PACKAGE_PYTHON_BOTTLE
bool "python-bottle"
- depends on BR2_PACKAGE_PYTHON
+ depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3
help
Bottle is a fast, simple and lightweight WSGI micro web-framework
for Python. It is distributed as a single file module and has no
--
1.8.3.2
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [Buildroot] [PATCHv1 23/26] python-serial: allow to build with Python 3
2014-02-13 20:48 [Buildroot] [PATCHv1 00/26] Python 2 and 3 bumps, support for Python 3 external modules Thomas Petazzoni
` (21 preceding siblings ...)
2014-02-13 20:49 ` [Buildroot] [PATCHv1 22/26] python-bottle: allow to build with Python 3 Thomas Petazzoni
@ 2014-02-13 20:49 ` Thomas Petazzoni
2014-02-13 20:49 ` [Buildroot] [PATCHv1 24/26] python-pyasn: " Thomas Petazzoni
` (3 subsequent siblings)
26 siblings, 0 replies; 36+ messages in thread
From: Thomas Petazzoni @ 2014-02-13 20:49 UTC (permalink / raw)
To: buildroot
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/python-serial/Config.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/python-serial/Config.in b/package/python-serial/Config.in
index df26af1..72f5567 100644
--- a/package/python-serial/Config.in
+++ b/package/python-serial/Config.in
@@ -1,6 +1,6 @@
config BR2_PACKAGE_PYTHON_SERIAL
bool "python-serial"
- depends on BR2_PACKAGE_PYTHON
+ depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3
help
python-serial is a Python library to access serial ports.
--
1.8.3.2
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [Buildroot] [PATCHv1 24/26] python-pyasn: allow to build with Python 3
2014-02-13 20:48 [Buildroot] [PATCHv1 00/26] Python 2 and 3 bumps, support for Python 3 external modules Thomas Petazzoni
` (22 preceding siblings ...)
2014-02-13 20:49 ` [Buildroot] [PATCHv1 23/26] python-serial: " Thomas Petazzoni
@ 2014-02-13 20:49 ` Thomas Petazzoni
2014-02-13 20:49 ` [Buildroot] [PATCHv1 25/26] python-pycrypto: " Thomas Petazzoni
` (2 subsequent siblings)
26 siblings, 0 replies; 36+ messages in thread
From: Thomas Petazzoni @ 2014-02-13 20:49 UTC (permalink / raw)
To: buildroot
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/python-pyasn/Config.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/python-pyasn/Config.in b/package/python-pyasn/Config.in
index 13095f9..eca53db 100644
--- a/package/python-pyasn/Config.in
+++ b/package/python-pyasn/Config.in
@@ -1,6 +1,6 @@
config BR2_PACKAGE_PYTHON_PYASN
bool "python-pyasn"
- depends on BR2_PACKAGE_PYTHON
+ depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3
depends on BR2_INSTALL_LIBSTDCPP
help
PyASN is a Python extension module that enables you to
--
1.8.3.2
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [Buildroot] [PATCHv1 25/26] python-pycrypto: allow to build with Python 3
2014-02-13 20:48 [Buildroot] [PATCHv1 00/26] Python 2 and 3 bumps, support for Python 3 external modules Thomas Petazzoni
` (23 preceding siblings ...)
2014-02-13 20:49 ` [Buildroot] [PATCHv1 24/26] python-pyasn: " Thomas Petazzoni
@ 2014-02-13 20:49 ` Thomas Petazzoni
2014-02-13 20:49 ` [Buildroot] [PATCHv1 26/26] python-pysnmp{, -apps, -mibs}: " Thomas Petazzoni
2014-02-13 20:55 ` [Buildroot] [PATCHv1 00/26] Python 2 and 3 bumps, support for Python 3 external modules Thomas Petazzoni
26 siblings, 0 replies; 36+ messages in thread
From: Thomas Petazzoni @ 2014-02-13 20:49 UTC (permalink / raw)
To: buildroot
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/python-pycrypto/Config.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/python-pycrypto/Config.in b/package/python-pycrypto/Config.in
index 60a3446..fe545b5 100644
--- a/package/python-pycrypto/Config.in
+++ b/package/python-pycrypto/Config.in
@@ -1,6 +1,6 @@
config BR2_PACKAGE_PYTHON_PYCRYPTO
bool "python-pycrypto"
- depends on BR2_PACKAGE_PYTHON
+ depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3
select BR2_PACKAGE_GMP
help
PyCrypto is a collection of cryptographic algorithms and
--
1.8.3.2
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [Buildroot] [PATCHv1 26/26] python-pysnmp{, -apps, -mibs}: allow to build with Python 3
2014-02-13 20:48 [Buildroot] [PATCHv1 00/26] Python 2 and 3 bumps, support for Python 3 external modules Thomas Petazzoni
` (24 preceding siblings ...)
2014-02-13 20:49 ` [Buildroot] [PATCHv1 25/26] python-pycrypto: " Thomas Petazzoni
@ 2014-02-13 20:49 ` Thomas Petazzoni
2014-02-13 20:55 ` [Buildroot] [PATCHv1 00/26] Python 2 and 3 bumps, support for Python 3 external modules Thomas Petazzoni
26 siblings, 0 replies; 36+ messages in thread
From: Thomas Petazzoni @ 2014-02-13 20:49 UTC (permalink / raw)
To: buildroot
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/python-pysnmp-apps/Config.in | 2 +-
package/python-pysnmp-mibs/Config.in | 2 +-
package/python-pysnmp/Config.in | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/package/python-pysnmp-apps/Config.in b/package/python-pysnmp-apps/Config.in
index 304e812..8edd04c 100644
--- a/package/python-pysnmp-apps/Config.in
+++ b/package/python-pysnmp-apps/Config.in
@@ -1,6 +1,6 @@
config BR2_PACKAGE_PYTHON_PYSNMP_APPS
bool "python-pysnmp-apps"
- depends on BR2_PACKAGE_PYTHON
+ depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3
select BR2_PACKAGE_PYTHON_PYSNMP
depends on BR2_INSTALL_LIBSTDCPP # pysnmp -> pyasn
help
diff --git a/package/python-pysnmp-mibs/Config.in b/package/python-pysnmp-mibs/Config.in
index 90ec933..cc03676 100644
--- a/package/python-pysnmp-mibs/Config.in
+++ b/package/python-pysnmp-mibs/Config.in
@@ -1,6 +1,6 @@
config BR2_PACKAGE_PYTHON_PYSNMP_MIBS
bool "python-pysnmp-mibs"
- depends on BR2_PACKAGE_PYTHON
+ depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3
select BR2_PACKAGE_PYTHON_PYSNMP
depends on BR2_INSTALL_LIBSTDCPP # pysnmp -> pyasn
help
diff --git a/package/python-pysnmp/Config.in b/package/python-pysnmp/Config.in
index d5f90ed..6cf18ee 100644
--- a/package/python-pysnmp/Config.in
+++ b/package/python-pysnmp/Config.in
@@ -1,6 +1,6 @@
config BR2_PACKAGE_PYTHON_PYSNMP
bool "python-pysnmp"
- depends on BR2_PACKAGE_PYTHON
+ depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3
depends on BR2_INSTALL_LIBSTDCPP # pyasn
select BR2_PACKAGE_PYTHON_PYASN
select BR2_PACKAGE_PYTHON_PYCRYPTO
--
1.8.3.2
^ permalink raw reply related [flat|nested] 36+ messages in thread
* [Buildroot] [PATCHv1 00/26] Python 2 and 3 bumps, support for Python 3 external modules
2014-02-13 20:48 [Buildroot] [PATCHv1 00/26] Python 2 and 3 bumps, support for Python 3 external modules Thomas Petazzoni
` (25 preceding siblings ...)
2014-02-13 20:49 ` [Buildroot] [PATCHv1 26/26] python-pysnmp{, -apps, -mibs}: " Thomas Petazzoni
@ 2014-02-13 20:55 ` Thomas Petazzoni
26 siblings, 0 replies; 36+ messages in thread
From: Thomas Petazzoni @ 2014-02-13 20:55 UTC (permalink / raw)
To: buildroot
Hello,
On Thu, 13 Feb 2014 21:48:49 +0100, Thomas Petazzoni wrote:
> This patch series contains a significant number of improvements to the
> Python packaging in Buildroot:
As a consequence of this patch series, I've marked the following
patches as superseded:
http://patchwork.ozlabs.org/patch/220706/
http://patchwork.ozlabs.org/patch/220707/
http://patchwork.ozlabs.org/patch/220705/
http://patchwork.ozlabs.org/patch/220708/
http://patchwork.ozlabs.org/patch/220709/
http://patchwork.ozlabs.org/patch/313448/
http://patchwork.ozlabs.org/patch/260435/
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 36+ messages in thread
* [Buildroot] [PATCHv1 12/26] python3: add config directory symbolic link
2014-02-13 20:49 ` [Buildroot] [PATCHv1 12/26] python3: add config directory symbolic link Thomas Petazzoni
@ 2014-02-13 21:54 ` Samuel Martin
0 siblings, 0 replies; 36+ messages in thread
From: Samuel Martin @ 2014-02-13 21:54 UTC (permalink / raw)
To: buildroot
Hi Thomas,
On Thu, Feb 13, 2014 at 9:49 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> From: "kpa_info at yahoo.fr" <kpa_info@yahoo.fr>
>
> When using host python to install an external module, the setup tool
> look for some files in python3.3/config/. The python3 package config
> directory is called config-3.3m. This is why we need to alias config
> to config-3.3m.
>
> [Thomas: use PYTHON3_VERSION_MAJOR instead of hardcoding 3.3, update
> commit title.]
>
> Signed-off-by: Patrick Gerber <kpa_info@yahoo.fr>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
> package/python3/python3.mk | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/package/python3/python3.mk b/package/python3/python3.mk
> index ba72e75..d98ca38 100644
> --- a/package/python3/python3.mk
> +++ b/package/python3/python3.mk
> @@ -163,7 +163,16 @@ define HOST_PYTHON3_INSTALL_SYMLINK
> ln -fs python3 $(HOST_DIR)/usr/bin/python
> endef
>
> -HOST_PYTHON3_POST_INSTALL_HOOKS += HOST_PYTHON3_INSTALL_SYMLINK
> +# Alias the python<version>/config-<version>m to python<version>/config
> +# This is needed when installing an external python module, because
> +# the setup is looking for files in python<version>/config/
> +define HOST_PYTHON3_INSTALL_CONFIG_SYMLINK
> + ln -fs config-$(PYTHON3_VERSION_MAJOR)m $(HOST_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOE)config
s/PYTHON3_VERSION_MAJOE/PYTHON3_VERSION_MAJOR/
Regards,
--
Samuel
^ permalink raw reply [flat|nested] 36+ messages in thread
* [Buildroot] [PATCHv1 01/26] python: expose PYTHON_PATH
2014-02-13 20:48 ` [Buildroot] [PATCHv1 01/26] python: expose PYTHON_PATH Thomas Petazzoni
@ 2014-02-14 20:52 ` Peter Korsgaard
0 siblings, 0 replies; 36+ messages in thread
From: Peter Korsgaard @ 2014-02-14 20:52 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
> As a preparation to make the Python infrastructure support both Python
> and Python 3, as well as the bump of Python 2 and 3, we need the
> Python package to expose the Python module path in a variable called
> PYTHON_PATH. It will be used by the following commits.
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Committed to next, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 36+ messages in thread
* [Buildroot] [PATCHv1 02/26] pkg-python: use the newly defined PYTHON_PATH variable
2014-02-13 20:48 ` [Buildroot] [PATCHv1 02/26] pkg-python: use the newly defined PYTHON_PATH variable Thomas Petazzoni
@ 2014-02-14 20:55 ` Peter Korsgaard
0 siblings, 0 replies; 36+ messages in thread
From: Peter Korsgaard @ 2014-02-14 20:55 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
> Now that the Python package exposes its PYTHON_PATH variable, we can
> use it in the package infrastructure. This prepares both the upcoming
> bump of Python 2.x, and the introduction of Python 3 support in the
> Python package infrastructure.
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Committed to next, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 36+ messages in thread
* [Buildroot] [PATCHv1 03/26] pkg-python: also pass PYTHONPATH when building distutils packages
2014-02-13 20:48 ` [Buildroot] [PATCHv1 03/26] pkg-python: also pass PYTHONPATH when building distutils packages Thomas Petazzoni
@ 2014-02-14 20:58 ` Peter Korsgaard
0 siblings, 0 replies; 36+ messages in thread
From: Peter Korsgaard @ 2014-02-14 20:58 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
> With the upcoming bump of Python 2.x, it will become important that
> the PYTHONPATH is passed whenever we build third-party packages, be
> they using the distutils build mechanism, or the setuptools build
> mechanism. This is because passing PYTHONPATH is what will allow
> Python to find a special Python module that contains all the
> compiler/library/headers definitions that are relevant when
> cross-compiling.
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Committed to next, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 36+ messages in thread
* [Buildroot] [PATCHv1 04/26] python: bump to 2.7.6
2014-02-13 20:48 ` [Buildroot] [PATCHv1 04/26] python: bump to 2.7.6 Thomas Petazzoni
@ 2014-02-14 20:59 ` Peter Korsgaard
0 siblings, 0 replies; 36+ messages in thread
From: Peter Korsgaard @ 2014-02-14 20:59 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
> 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>
Committed to next, thanks.
> ---
> .../python-001-remove-host-header-path.patch | 32 +++++
> package/python/python-002-fix-get-python-inc.patch | 36 +++++
> ...ython-003-properly-detect-if-python-build.patch | 23 +++
> ...python-004-sysconfigdata-install-location.patch | 76 ++++++++++
> .../python/python-005-pyc-pyo-conditional.patch | 59 ++++++++
> .../python-006-cross-compile-getaddrinfo.patch | 13 ++
> package/python/python-007-disable-extensions.patch | 60 ++++++++
> .../python-008-distutils-use-python-sysroot.patch | 54 ++++++++
> .../python/python-009-no-termcap-host-path.patch | 23 +++
> ...atch => python-100-optional-test-modules.patch} | 48 ++++---
> ...pydoc.patch => python-101-optional-pydoc.patch} | 36 ++---
> ...l-2to3.patch => python-102-optional-2to3.patch} | 51 ++++---
> ...lite.patch => python-103-optional-sqlite.patch} | 49 ++++---
> ...ional-tk.patch => python-104-optional-tk.patch} | 46 +++---
> ...rses.patch => python-105-optional-curses.patch} | 24 ++--
> ...expat.patch => python-106-optional-expat.patch} | 30 ++--
> ....patch => python-107-optional-codecs-cjk.patch} | 8 +-
> ...nal-nis.patch => python-108-optional-nis.patch} | 8 +-
> ...patch => python-109-optional-unicodedata.patch} | 8 +-
> ...ional-db.patch => python-110-optional-db.patch} | 41 +++---
> ...nal-ssl.patch => python-111-optional-ssl.patch} | 8 +-
> ...bzip2.patch => python-112-optional-bzip2.patch} | 8 +-
> ...l-zlib.patch => python-113-optional-zlib.patch} | 8 +-
> .../python/python-2.7-001-support-for-build.patch | 154 ---------------------
> .../python-2.7-002-cross-compile-variable.patch | 55 --------
> ...on-2.7-003-no-import-when-cross-compiling.patch | 26 ----
> .../python-2.7-004-no-host-headers-libs.patch | 111 ---------------
> .../python-2.7-005-staging-headers-libs.patch | 38 -----
> .../python/python-2.7-006-disable-extensions.patch | 102 --------------
> .../python-2.7-007-do-not-generate-pyo-files.patch | 40 ------
> .../python/python-2.7-008-reread-environment.patch | 65 ---------
> ...python-2.7-010-change-pyconfig-h-location.patch | 76 ----------
> package/python/python-2.7-011-no-rpath.patch | 75 ----------
> .../python-2.7-012-correct-32bit-64bit-check.patch | 55 --------
> .../python-2.7-013-fix-linux-3-compilation.patch | 24 ----
> .../python-2.7-014-verbose-module-build.patch | 19 ---
> ...7-015-distutils-cross-compilation-support.patch | 125 -----------------
> .../python-2.7-016-cross-compile-getaddrinfo.patch | 15 --
> package/python/python.mk | 49 +++----
> 39 files changed, 589 insertions(+), 1189 deletions(-)
> create mode 100644 package/python/python-001-remove-host-header-path.patch
> create mode 100644 package/python/python-002-fix-get-python-inc.patch
> create mode 100644 package/python/python-003-properly-detect-if-python-build.patch
> create mode 100644 package/python/python-004-sysconfigdata-install-location.patch
> create mode 100644 package/python/python-005-pyc-pyo-conditional.patch
> create mode 100644 package/python/python-006-cross-compile-getaddrinfo.patch
> create mode 100644 package/python/python-007-disable-extensions.patch
> create mode 100644 package/python/python-008-distutils-use-python-sysroot.patch
> create mode 100644 package/python/python-009-no-termcap-host-path.patch
> rename package/python/{python-2.7-100-optional-test-modules.patch => python-100-optional-test-modules.patch} (71%)
> rename package/python/{python-2.7-101-optional-pydoc.patch => python-101-optional-pydoc.patch} (77%)
> rename package/python/{python-2.7-102-optional-2to3.patch => python-102-optional-2to3.patch} (70%)
> rename package/python/{python-2.7-103-optional-sqlite.patch => python-103-optional-sqlite.patch} (57%)
> rename package/python/{python-2.7-104-optional-tk.patch => python-104-optional-tk.patch} (59%)
> rename package/python/{python-2.7-105-optional-curses.patch => python-105-optional-curses.patch} (75%)
> rename package/python/{python-2.7-106-optional-expat.patch => python-106-optional-expat.patch} (84%)
> rename package/python/{python-2.7-107-optional-codecs-cjk.patch => python-107-optional-codecs-cjk.patch} (84%)
> rename package/python/{python-2.7-108-optional-nis.patch => python-108-optional-nis.patch} (85%)
> rename package/python/{python-2.7-109-optional-unicodedata.patch => python-109-optional-unicodedata.patch} (83%)
> rename package/python/{python-2.7-110-optional-db.patch => python-110-optional-db.patch} (75%)
> rename package/python/{python-2.7-111-optional-ssl.patch => python-111-optional-ssl.patch} (83%)
> rename package/python/{python-2.7-112-optional-bzip2.patch => python-112-optional-bzip2.patch} (83%)
> rename package/python/{python-2.7-113-optional-zlib.patch => python-113-optional-zlib.patch} (84%)
> delete mode 100644 package/python/python-2.7-001-support-for-build.patch
> delete mode 100644 package/python/python-2.7-002-cross-compile-variable.patch
> delete mode 100644 package/python/python-2.7-003-no-import-when-cross-compiling.patch
> delete mode 100644 package/python/python-2.7-004-no-host-headers-libs.patch
> delete mode 100644 package/python/python-2.7-005-staging-headers-libs.patch
> delete mode 100644 package/python/python-2.7-006-disable-extensions.patch
> delete mode 100644 package/python/python-2.7-007-do-not-generate-pyo-files.patch
> delete mode 100644 package/python/python-2.7-008-reread-environment.patch
> delete mode 100644 package/python/python-2.7-010-change-pyconfig-h-location.patch
> delete mode 100644 package/python/python-2.7-011-no-rpath.patch
> delete mode 100644 package/python/python-2.7-012-correct-32bit-64bit-check.patch
> delete mode 100644 package/python/python-2.7-013-fix-linux-3-compilation.patch
> delete mode 100644 package/python/python-2.7-014-verbose-module-build.patch
> delete mode 100644 package/python/python-2.7-015-distutils-cross-compilation-support.patch
> delete mode 100644 package/python/python-2.7-016-cross-compile-getaddrinfo.patch
> diff --git a/package/python/python-001-remove-host-header-path.patch b/package/python/python-001-remove-host-header-path.patch
> new file mode 100644
> index 0000000..206751d
> --- /dev/null
> +++ b/package/python/python-001-remove-host-header-path.patch
> @@ -0,0 +1,32 @@
> +setup.py: do not add invalid header locations
> +
> +This piece of code incorrectly adds /usr/include to
> +self.compiler.include_dirs, and results in the following invalid
> +compilation line:
> +
> +/home/thomas/projets/buildroot/output/host/usr/bin/arm-none-linux-gnueabi-gcc -fPIC \
> + -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 \
> + -pipe -Os -DNDEBUG -g -O3 -Wall -Wstrict-prototypes \
> + -I/usr/include -I. -IInclude -I./Include \
> + -I/home/thomas/projets/buildroot/output/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/include \
> + -I/home/thomas/projets/buildroot/output/build/python-2.7.6/Include \
> + -I/home/thomas/projets/buildroot/output/build/python-2.7.6 \
> + -c /home/thomas/projets/buildroot/output/build/python-2.7.6/Modules/mathmodule.c \
> + -o build/temp.linux2-arm-2.7/home/thomas/projets/buildroot/output/build/python-2.7.6/Modules/mathmodule.o
> +cc1: warning: include location "/usr/include" is unsafe for cross-compilation [-Wpoison-system-directories]
> +[...]
> +
> +Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> +Index: b/setup.py
> +===================================================================
> +--- a/setup.py
> ++++ b/setup.py
> +@@ -478,7 +478,7 @@
> + for directory in reversed(options.dirs):
> + add_dir_to_list(dir_list, directory)
> +
> +- if os.path.normpath(sys.prefix) != '/usr' \
> ++ if False and 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
> diff --git a/package/python/python-002-fix-get-python-inc.patch b/package/python/python-002-fix-get-python-inc.patch
> new file mode 100644
> index 0000000..bfee03a
> --- /dev/null
> +++ b/package/python/python-002-fix-get-python-inc.patch
> @@ -0,0 +1,36 @@
> +Fix get_python_inc() for cross-compilation
> +
> +When we are cross compiling, doing os.path.dirname(sys.executable) to
> +get the build directory is incorrect, because we're executing the host
> +Python to build things for the target. Instead, we should use the
> +project_base variable.
> +
> +This fixes cross-compilation, which was adding incorrect header paths
> +pointing to the location where the host Python was built:
> +
> +/home/thomas/projets/buildroot/output/host/usr/bin/arm-none-linux-gnueabi-gcc -fPIC -fno-strict-aliasing \
> + -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -pipe -Os -DNDEBUG -g -O3 -Wall -Wstrict-prototypes \
> + -I/usr/include -I. -IInclude -I./Include -I/home/thomas/projets/buildroot/output/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/include \
> + -I/home/thomas/projets/buildroot/output/host/usr/bin/Include -I/home/thomas/projets/buildroot/output/host/usr/bin \
> + -c /home/thomas/projets/buildroot/output/build/python-2.7.6/Modules/_struct.c \
> + -o build/temp.linux2-arm-2.7/home/thomas/projets/buildroot/output/build/python-2.7.6/Modules/_struct.o
> +
> +This patch allows to fix the
> +/home/thomas/projets/buildroot/output/host/usr/bin/Include and
> +/home/thomas/projets/buildroot/output/host/usr/bin paths that are
> +incorrectly added to the header paths.
> +
> +Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> +Index: b/Lib/distutils/sysconfig.py
> +===================================================================
> +--- a/Lib/distutils/sysconfig.py
> ++++ b/Lib/distutils/sysconfig.py
> +@@ -79,7 +79,7 @@
> +
> + if os.name == "posix":
> + if python_build:
> +- buildir = os.path.dirname(sys.executable)
> ++ buildir = project_base
> + if plat_specific:
> + # python.h is located in the buildir
> + inc_dir = buildir
> diff --git a/package/python/python-003-properly-detect-if-python-build.patch b/package/python/python-003-properly-detect-if-python-build.patch
> new file mode 100644
> index 0000000..3fb865f
> --- /dev/null
> +++ b/package/python/python-003-properly-detect-if-python-build.patch
> @@ -0,0 +1,23 @@
> +distutils: fix build_ext check to find whether we're building Python or not
> +
> +The build_ext logic uses
> +sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")) to
> +determine whether we're building a third-party Python extension, or a
> +built-in Python extension. However, this check is wrong in
> +cross-compilation mode, and instead, the sysconfig.python_build
> +variable should be used.
> +
> +Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> +Index: b/Lib/distutils/command/build_ext.py
> +===================================================================
> +--- a/Lib/distutils/command/build_ext.py
> ++++ b/Lib/distutils/command/build_ext.py
> +@@ -235,7 +235,7 @@
> + # Python's library directory must be appended to library_dirs
> + # See Issues: #1600860, #4366
> + if (sysconfig.get_config_var('Py_ENABLE_SHARED')):
> +- if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")):
> ++ if not sysconfig.python_build:
> + # building third party extensions
> + self.library_dirs.append(sysconfig.get_config_var('LIBDIR'))
> + else:
> diff --git a/package/python/python-004-sysconfigdata-install-location.patch b/package/python/python-004-sysconfigdata-install-location.patch
> new file mode 100644
> index 0000000..940dde7
> --- /dev/null
> +++ b/package/python/python-004-sysconfigdata-install-location.patch
> @@ -0,0 +1,76 @@
> +Change the install location of _sysconfigdata.py
> +
> +The _sysconfigdata.py module contains definitions that are needed when
> +building Python modules. In cross-compilation mode, when building
> +Python extensions for the target, we need to use the _sysconfigdata.py
> +of the target Python while executing the host Python.
> +
> +However until now, the _sysconfigdata.py module was installed in
> +build/lib.<arch>-<version> directory, together with a number of
> +architecture-specific shared objects, which cannot be used with the
> +host Python.
> +
> +To solve this problem, this patch moves _sysconfigdata.py to a
> +separate location, build/sysconfigdata.<arch>-<version>/, and only
> +this directory gets added to the PYTHONPATH of the host Python
> +interpreter when building Python modules for the target.
> +
> +Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> +
> +Index: b/Makefile.pre.in
> +===================================================================
> +--- a/Makefile.pre.in
> ++++ b/Makefile.pre.in
> +@@ -449,6 +449,9 @@
> + # sys.path fixup -- see Modules/getpath.c.
> + pybuilddir.txt: $(BUILDPYTHON)
> + $(RUNSHARED) $(PYTHON_FOR_BUILD) -S -m sysconfig --generate-posix-vars
> ++ echo `cat pybuilddir.txt`/sysconfigdata > pysysconfigdatadir.txt
> ++ mkdir -p `cat pysysconfigdatadir.txt`
> ++ cp `cat pybuilddir.txt`/_sysconfigdata.py `cat pysysconfigdatadir.txt`
> +
> + # Build the shared modules
> + # Under GNU make, MAKEFLAGS are sorted and normalized; the 's' for
> +@@ -965,7 +968,7 @@
> + else true; \
> + fi; \
> + done
> +- @for i in $(srcdir)/Lib/*.py `cat pybuilddir.txt`/_sysconfigdata.py $(srcdir)/Lib/*.doc $(srcdir)/Lib/*.egg-info ; \
> ++ @for i in $(srcdir)/Lib/*.py $(srcdir)/Lib/*.doc $(srcdir)/Lib/*.egg-info ; \
> + do \
> + if test -x $$i; then \
> + $(INSTALL_SCRIPT) $$i $(DESTDIR)$(LIBDEST); \
> +@@ -975,6 +978,11 @@
> + echo $(INSTALL_DATA) $$i $(LIBDEST); \
> + fi; \
> + done
> ++ $(INSTALL_DATA) `cat pysysconfigdatadir.txt`/_sysconfigdata.py \
> ++ $(DESTDIR)$(LIBDEST)
> ++ mkdir -p $(DESTDIR)$(LIBDEST)/sysconfigdata
> ++ $(INSTALL_DATA) `cat pysysconfigdatadir.txt`/_sysconfigdata.py \
> ++ $(DESTDIR)$(LIBDEST)/sysconfigdata
> + @for d in $(LIBSUBDIRS); \
> + do \
> + a=$(srcdir)/Lib/$$d; \
> +@@ -1299,7 +1307,7 @@
> + Modules/Setup Modules/Setup.local Modules/Setup.config \
> + Modules/ld_so_aix Modules/python.exp Misc/python.pc
> + -rm -f python*-gdb.py
> +- -rm -f pybuilddir.txt
> ++ -rm -f pybuilddir.txt pysysconfigdatadir.txt
> + find $(srcdir)/[a-zA-Z]* '(' -name '*.fdc' -o -name '*~' \
> + -o -name '[@,#]*' -o -name '*.old' \
> + -o -name '*.orig' -o -name '*.rej' \
> +Index: b/configure.ac
> +===================================================================
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -30,7 +30,7 @@
> + AC_MSG_ERROR([python$PACKAGE_VERSION interpreter not found])
> + fi
> + AC_MSG_RESULT($interp)
> +- PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/plat-$(MACHDEP) '$interp
> ++ PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pysysconfigdatadir.txt && echo $(abs_builddir)/`cat pysysconfigdatadir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/plat-$(MACHDEP) '$interp
> + fi
> + elif test "$cross_compiling" = maybe; then
> + AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH])
> diff --git a/package/python/python-005-pyc-pyo-conditional.patch b/package/python/python-005-pyc-pyo-conditional.patch
> new file mode 100644
> index 0000000..aa3b330
> --- /dev/null
> +++ b/package/python/python-005-pyc-pyo-conditional.patch
> @@ -0,0 +1,59 @@
> +Index: b/Makefile.pre.in
> +===================================================================
> +--- a/Makefile.pre.in
> ++++ b/Makefile.pre.in
> +@@ -1013,24 +1013,32 @@
> + $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
> + $(DESTDIR)$(LIBDEST)/distutils/tests ; \
> + fi
> ++ifeq (@PYC_BUILD@,yes)
> + PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
> + $(PYTHON_FOR_BUILD) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
> + -d $(LIBDEST) -f \
> + -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
> + $(DESTDIR)$(LIBDEST)
> ++endif
> ++ifeq (@PYO_BUILD@,yes)
> + PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
> + $(PYTHON_FOR_BUILD) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
> + -d $(LIBDEST) -f \
> + -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
> + $(DESTDIR)$(LIBDEST)
> ++endif
> ++ifeq (@PYC_BUILD@,yes)
> + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
> + $(PYTHON_FOR_BUILD) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
> + -d $(LIBDEST)/site-packages -f \
> + -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
> ++endif
> ++ifeq (@PYO_BUILD@,yes)
> + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
> + $(PYTHON_FOR_BUILD) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
> + -d $(LIBDEST)/site-packages -f \
> + -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
> ++endif
> + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
> + $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
> + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
> +Index: b/configure.ac
> +===================================================================
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -733,6 +733,17 @@
> + ;;
> + esac
> +
> ++AC_SUBST(PYC_BUILD)
> ++
> ++AC_ARG_ENABLE(pyc-build,
> ++ AS_HELP_STRING([--disable-pyc-build], [disable build of pyc files]),
> ++ [ PYC_BUILD="${enableval}" ], [ PYC_BUILD=yes ])
> ++
> ++AC_SUBST(PYO_BUILD)
> ++
> ++AC_ARG_ENABLE(pyo-build,
> ++ AS_HELP_STRING([--disable-pyo-build], [disable build of pyo files]),
> ++ [ PYO_BUILD="${enableval}" ], [ PYO_BUILD=yes ])
> +
> + AC_SUBST(LIBRARY)
> + AC_MSG_CHECKING(LIBRARY)
> diff --git a/package/python/python-006-cross-compile-getaddrinfo.patch b/package/python/python-006-cross-compile-getaddrinfo.patch
> new file mode 100644
> index 0000000..2c8248f
> --- /dev/null
> +++ b/package/python/python-006-cross-compile-getaddrinfo.patch
> @@ -0,0 +1,13 @@
> +Index: b/configure.ac
> +===================================================================
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -3337,7 +3337,7 @@
> +
> + AC_MSG_RESULT($ac_cv_buggy_getaddrinfo)
> +
> +-if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
> ++if test $have_getaddrinfo = no || test "$cross_compiling" != "yes" -a "$ac_cv_buggy_getaddrinfo" = yes
> + then
> + if test $ipv6 = yes
> + then
> diff --git a/package/python/python-007-disable-extensions.patch b/package/python/python-007-disable-extensions.patch
> new file mode 100644
> index 0000000..c03f84c
> --- /dev/null
> +++ b/package/python/python-007-disable-extensions.patch
> @@ -0,0 +1,60 @@
> +Index: b/Makefile.pre.in
> +===================================================================
> +--- a/Makefile.pre.in
> ++++ b/Makefile.pre.in
> +@@ -153,6 +153,8 @@
> + # configure script arguments
> + CONFIG_ARGS= @CONFIG_ARGS@
> +
> ++# disabled extensions
> ++DISABLED_EXTENSIONS= @DISABLED_EXTENSIONS@
> +
> + # Subdirectories with code
> + SRCDIRS= @SRCDIRS@
> +@@ -464,6 +466,7 @@
> + esac; \
> + $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \
> + _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \
> ++ DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" \
> + $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build
> +
> + # Build static library
> +@@ -1154,7 +1157,8 @@
> + # Install the dynamically loadable modules
> + # This goes into $(exec_prefix)
> + sharedinstall: sharedmods
> +- $(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \
> ++ $(RUNSHARED) DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" \
> ++ $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \
> + --prefix=$(prefix) \
> + --install-scripts=$(BINDIR) \
> + --install-platlib=$(DESTSHARED) \
> +Index: b/configure.ac
> +===================================================================
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -2275,6 +2275,8 @@
> +
> + AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
> +
> ++AC_SUBST(DISABLED_EXTENSIONS)
> ++
> + # Check for use of the system expat library
> + AC_MSG_CHECKING(for --with-system-expat)
> + AC_ARG_WITH(system_expat,
> +Index: b/setup.py
> +===================================================================
> +--- a/setup.py
> ++++ b/setup.py
> +@@ -33,7 +33,10 @@
> + COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS"))
> +
> + # This global variable is used to hold the list of modules to be disabled.
> +-disabled_module_list = []
> ++try:
> ++ disabled_module_list = sysconfig.get_config_var("DISABLED_EXTENSIONS").split(" ")
> ++except KeyError:
> ++ disabled_module_list = list()
> +
> + def add_dir_to_list(dirlist, dir):
> + """Add the directory 'dir' to the list 'dirlist' (at the front) if
> diff --git a/package/python/python-008-distutils-use-python-sysroot.patch b/package/python/python-008-distutils-use-python-sysroot.patch
> new file mode 100644
> index 0000000..7cd7487
> --- /dev/null
> +++ b/package/python/python-008-distutils-use-python-sysroot.patch
> @@ -0,0 +1,54 @@
> +Adjust library/header paths for cross-compilation
> +
> +When cross-compiling third-party extensions, the get_python_inc() or
> +get_python_lib() can be called, to return the path to headers or
> +libraries. However, they use the sys.prefix of the host Python, which
> +returns incorrect paths when cross-compiling (paths pointing to host
> +headers and libraries).
> +
> +In order to fix this, we introduce the _python_sysroot, _python_prefix
> +and _python_exec_prefix variables, that allow to override these
> +values, and get correct header/library paths when cross-compiling
> +third-party Python modules.
> +
> +The _python_sysroot variable is also used to prefix the LIBDIR value
> +taken from the sysconfigdata module.
> +
> +Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> +
> +Index: b/Lib/distutils/sysconfig.py
> +===================================================================
> +--- a/Lib/distutils/sysconfig.py
> ++++ b/Lib/distutils/sysconfig.py
> +@@ -19,8 +19,13 @@
> + from distutils.errors import DistutilsPlatformError
> +
> + # These are needed in a couple of spots, so just compute them once.
> +-PREFIX = os.path.normpath(sys.prefix)
> +-EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
> ++if "_python_sysroot" in os.environ:
> ++ _sysroot=os.environ.get('_python_sysroot')
> ++ PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_prefix'))
> ++ EXEC_PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_exec_prefix'))
> ++else:
> ++ PREFIX = os.path.normpath(sys.prefix)
> ++ EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
> +
> + # Path to the base directory of the project. On Windows the binary may
> + # live in project/PCBuild9. If we're dealing with an x64 Windows build,
> +Index: b/Lib/distutils/command/build_ext.py
> +===================================================================
> +--- a/Lib/distutils/command/build_ext.py
> ++++ b/Lib/distutils/command/build_ext.py
> +@@ -237,7 +237,10 @@
> + if (sysconfig.get_config_var('Py_ENABLE_SHARED')):
> + if not sysconfig.python_build:
> + # building third party extensions
> +- self.library_dirs.append(sysconfig.get_config_var('LIBDIR'))
> ++ libdir = sysconfig.get_config_var('LIBDIR')
> ++ if "_python_sysroot" in os.environ:
> ++ libdir = os.environ.get("_python_sysroot") + libdir
> ++ self.library_dirs.append(libdir)
> + else:
> + # building python standard extensions
> + self.library_dirs.append('.')
> diff --git a/package/python/python-009-no-termcap-host-path.patch b/package/python/python-009-no-termcap-host-path.patch
> new file mode 100644
> index 0000000..7df8a32
> --- /dev/null
> +++ b/package/python/python-009-no-termcap-host-path.patch
> @@ -0,0 +1,23 @@
> +Don't look in /usr/lib/termcap for libraries
> +
> +Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> +
> +
> +Index: b/setup.py
> +===================================================================
> +--- a/setup.py
> ++++ b/setup.py
> +@@ -760,12 +760,9 @@
> + pass # Issue 7384: Already linked against curses or tinfo.
> + elif curses_library:
> + readline_libs.append(curses_library)
> +- elif self.compiler.find_library_file(lib_dirs +
> +- ['/usr/lib/termcap'],
> +- 'termcap'):
> ++ elif self.compiler.find_library_file(lib_dirs, 'termcap'):
> + readline_libs.append('termcap')
> + exts.append( Extension('readline', ['readline.c'],
> +- library_dirs=['/usr/lib/termcap'],
> + extra_link_args=readline_extra_link_args,
> + libraries=readline_libs) )
> + else:
> diff --git a/package/python/python-2.7-100-optional-test-modules.patch b/package/python/python-100-optional-test-modules.patch
> similarity index 71%
> rename from package/python/python-2.7-100-optional-test-modules.patch
> rename to package/python/python-100-optional-test-modules.patch
> index a988717..a5f7545 100644
> --- a/package/python/python-2.7-100-optional-test-modules.patch
> +++ b/package/python/python-100-optional-test-modules.patch
> @@ -11,19 +11,20 @@ Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> configure.in | 6 ++++++
> 2 files changed, 33 insertions(+), 13 deletions(-)
> -Index: Python-2.7.2/Makefile.pre.in
> +Index: b/Makefile.pre.in
> ===================================================================
> ---- Python-2.7.2.orig/Makefile.pre.in
> -+++ Python-2.7.2/Makefile.pre.in
> -@@ -856,23 +856,30 @@
> +--- a/Makefile.pre.in
> ++++ b/Makefile.pre.in
> +@@ -934,23 +934,40 @@
> plat-mac/lib-scriptpackages/SystemEvents \
> - plat-mac/lib-scriptpackages/Terminal
> + plat-mac/lib-scriptpackages/Terminal
> PLATMACPATH=:plat-mac:plat-mac/lib-scriptpackages
> -LIBSUBDIRS= lib-tk lib-tk/test lib-tk/test/test_tkinter \
> -- lib-tk/test/test_ttk site-packages test test/data \
> +- lib-tk/test/test_ttk site-packages test test/audiodata test/data \
> - test/cjkencodings test/decimaltestdata test/xmltestdata test/subprocessdata \
> - test/tracedmodules \
> -+LIBSUBDIRS= lib-tk site-packages \
> ++LIBSUBDIRS= lib-tk \
> ++ site-packages \
> encodings compiler hotshot \
> - email email/mime email/test email/test/data \
> - json json/tests \
> @@ -39,31 +40,40 @@ Index: Python-2.7.2/Makefile.pre.in
> + logging bsddb csv importlib wsgiref \
> + lib2to3 lib2to3/fixes lib2to3/pgen2 \
> + ctypes ctypes/macholib idlelib idlelib/Icons \
> -+ distutils distutils/command $(XMLLIBSUBDIRS) \
> ++ distutils distutils/command $(XMLLIBSUBDIRS) \
> multiprocessing multiprocessing/dummy \
> - unittest unittest/test \
> + unittest \
> lib-old \
> curses pydoc_data $(MACHDEPS)
> +
> ++TESTSUBDIRS = lib-tk/test lib-tk/test/test_tkinter \
> ++ lib-tk/test/test_ttk \
> ++ test test/audiodata test/data \
> ++ test/cjkencodings test/decimaltestdata test/xmltestdata test/subprocessdata \
> ++ test/tracedmodules \
> ++ email/test email/test/data \
> ++ json/tests \
> ++ sqlite3/test \
> ++ bsddb/test \
> ++ lib2to3/tests \
> ++ lib2to3/tests/data lib2to3/tests/data/fixers lib2to3/tests/data/fixers/myfixes \
> ++ ctypes/test \
> ++ distutils/tests \
> ++ unittest/test
> ++
> +ifeq (@TEST_MODULES@,yes)
> -+LIBSUBDIRS += lib-tk/test lib-tk/test/test_tkinter \
> -+ lib-tk/test/test_ttk test test/data \
> -+ test/cjkencodings test/decimaltestdata test/xmltestdata test/subprocessdata \
> -+ test/tracedmodules email/test email/test/data \
> -+ json/tests sqlite3/test bsddb/test lib2to3/tests \
> -+ lib2to3/tests/data lib2to3/tests/data/fixers lib2to3/tests/data/fixers/myfixes \
> -+ ctypes/test distutils/tests unittest/test
> ++LIBSUBDIRS += $(TESTSUBDIRS)
> +endif
> +
> libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
> @for i in $(SCRIPTDIR) $(LIBDEST); \
> do \
> -Index: Python-2.7.2/configure.in
> +Index: b/configure.ac
> ===================================================================
> ---- Python-2.7.2.orig/configure.in
> -+++ Python-2.7.2/configure.in
> -@@ -2408,6 +2408,12 @@
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -2614,6 +2614,12 @@
> fi
> diff --git a/package/python/python-2.7-101-optional-pydoc.patch b/package/python/python-101-optional-pydoc.patch
> similarity index 77%
> rename from package/python/python-2.7-101-optional-pydoc.patch
> rename to package/python/python-101-optional-pydoc.patch
> index ccc937b..c9b05bd 100644
> --- a/package/python/python-2.7-101-optional-pydoc.patch
> +++ b/package/python/python-101-optional-pydoc.patch
> @@ -12,21 +12,21 @@ Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> setup.py | 10 +++++++---
> 3 files changed, 17 insertions(+), 4 deletions(-)
> -Index: Python-2.7.2/Makefile.pre.in
> +Index: b/Makefile.pre.in
> ===================================================================
> ---- Python-2.7.2.orig/Makefile.pre.in
> -+++ Python-2.7.2/Makefile.pre.in
> -@@ -868,7 +868,7 @@
> +--- a/Makefile.pre.in
> ++++ b/Makefile.pre.in
> +@@ -947,7 +947,7 @@
> multiprocessing multiprocessing/dummy \
> unittest \
> lib-old \
> - curses pydoc_data $(MACHDEPS)
> + curses $(MACHDEPS)
> - ifeq (@TEST_MODULES@,yes)
> - LIBSUBDIRS += lib-tk/test lib-tk/test/test_tkinter \
> -@@ -880,6 +880,10 @@
> - ctypes/test distutils/tests unittest/test
> + TESTSUBDIRS = lib-tk/test lib-tk/test/test_tkinter \
> + lib-tk/test/test_ttk \
> +@@ -968,6 +968,10 @@
> + LIBSUBDIRS += $(TESTSUBDIRS)
> endif
> +ifeq (@PYDOC@,yes)
> @@ -36,12 +36,12 @@ Index: Python-2.7.2/Makefile.pre.in
> libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
> @for i in $(SCRIPTDIR) $(LIBDEST); \
> do \
> -Index: Python-2.7.2/configure.in
> +Index: b/configure.ac
> ===================================================================
> ---- Python-2.7.2.orig/configure.in
> -+++ Python-2.7.2/configure.in
> -@@ -2407,6 +2407,11 @@
> - esac])
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -2613,6 +2613,11 @@
> + AC_CHECK_FUNCS(pthread_atfork)
> fi
> +AC_SUBST(PYDOC)
> @@ -52,11 +52,11 @@ Index: Python-2.7.2/configure.in
> AC_SUBST(TEST_MODULES)
> -Index: Python-2.7.2/setup.py
> +Index: b/setup.py
> ===================================================================
> ---- Python-2.7.2.orig/setup.py
> -+++ Python-2.7.2/setup.py
> -@@ -2092,6 +2092,12 @@
> +--- a/setup.py
> ++++ b/setup.py
> +@@ -2205,6 +2205,12 @@
> # turn off warnings when deprecated modules are imported
> import warnings
> warnings.filterwarnings("ignore",category=DeprecationWarning)
> @@ -69,7 +69,7 @@ Index: Python-2.7.2/setup.py
> setup(# PyPI Metadata (PEP 301)
> name = "Python",
> version = sys.version.split()[0],
> -@@ -2112,9 +2118,7 @@
> +@@ -2225,9 +2231,7 @@
> ext_modules=[Extension('_struct', ['_struct.c'])],
> # Scripts to install
> diff --git a/package/python/python-2.7-102-optional-2to3.patch b/package/python/python-102-optional-2to3.patch
> similarity index 70%
> rename from package/python/python-2.7-102-optional-2to3.patch
> rename to package/python/python-102-optional-2to3.patch
> index 0321619..586b24b 100644
> --- a/package/python/python-2.7-102-optional-2to3.patch
> +++ b/package/python/python-102-optional-2to3.patch
> @@ -12,50 +12,47 @@ Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> setup.py | 5 +++--
> 3 files changed, 26 insertions(+), 9 deletions(-)
> -Index: Python-2.7.2/Makefile.pre.in
> +Index: b/Makefile.pre.in
> ===================================================================
> ---- Python-2.7.2.orig/Makefile.pre.in
> -+++ Python-2.7.2/Makefile.pre.in
> -@@ -862,7 +862,6 @@
> +--- a/Makefile.pre.in
> ++++ b/Makefile.pre.in
> +@@ -941,7 +941,6 @@
> json \
> sqlite3 \
> logging bsddb csv importlib wsgiref \
> - lib2to3 lib2to3/fixes lib2to3/pgen2 \
> ctypes ctypes/macholib idlelib idlelib/Icons \
> - distutils distutils/command $(XMLLIBSUBDIRS) \
> + distutils distutils/command $(XMLLIBSUBDIRS) \
> multiprocessing multiprocessing/dummy \
> -@@ -875,8 +874,7 @@
> - lib-tk/test/test_ttk test test/data \
> - test/cjkencodings test/decimaltestdata test/xmltestdata test/subprocessdata \
> - test/tracedmodules email/test email/test/data \
> -- json/tests sqlite3/test bsddb/test lib2to3/tests \
> -- lib2to3/tests/data lib2to3/tests/data/fixers lib2to3/tests/data/fixers/myfixes \
> -+ json/tests sqlite3/test bsddb/test \
> - ctypes/test distutils/tests unittest/test
> - endif
> -
> -@@ -884,6 +882,16 @@
> +@@ -958,8 +957,6 @@
> + json/tests \
> + sqlite3/test \
> + bsddb/test \
> +- lib2to3/tests \
> +- lib2to3/tests/data lib2to3/tests/data/fixers lib2to3/tests/data/fixers/myfixes \
> + ctypes/test \
> + distutils/tests \
> + unittest/test
> +@@ -972,6 +969,14 @@
> LIBSUBDIRS += pydoc_data
> endif
> +ifeq (@LIB2TO3@,yes)
> +LIBSUBDIRS += lib2to3 lib2to3/fixes lib2to3/pgen2
> -+ifeq (@TEST_MODULES@,yes)
> -+LIBSUBDIRS += lib2to3/tests \
> ++TESTSUBDIRS += lib2to3/tests \
> + lib2to3/tests/data \
> + lib2to3/tests/data/fixers \
> + lib2to3/tests/data/fixers/myfixes
> +endif
> -+endif
> +
> libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
> @for i in $(SCRIPTDIR) $(LIBDEST); \
> do \
> -Index: Python-2.7.2/configure.in
> +Index: b/configure.ac
> ===================================================================
> ---- Python-2.7.2.orig/configure.in
> -+++ Python-2.7.2/configure.in
> -@@ -2419,6 +2419,12 @@
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -2625,6 +2625,12 @@
> AS_HELP_STRING([--disable-test-modules], [disable test modules]),
> [ TEST_MODULES="${enableval}" ], [ TEST_MODULES=yes ])
> @@ -68,11 +65,11 @@ Index: Python-2.7.2/configure.in
> # Check for enable-ipv6
> AH_TEMPLATE(ENABLE_IPV6, [Define if --enable-ipv6 is specified])
> AC_MSG_CHECKING([if --enable-ipv6 is specified])
> -Index: Python-2.7.2/setup.py
> +Index: b/setup.py
> ===================================================================
> ---- Python-2.7.2.orig/setup.py
> -+++ Python-2.7.2/setup.py
> -@@ -2093,10 +2093,11 @@
> +--- a/setup.py
> ++++ b/setup.py
> +@@ -2206,10 +2206,11 @@
> import warnings
> warnings.filterwarnings("ignore",category=DeprecationWarning)
> diff --git a/package/python/python-2.7-103-optional-sqlite.patch b/package/python/python-103-optional-sqlite.patch
> similarity index 57%
> rename from package/python/python-2.7-103-optional-sqlite.patch
> rename to package/python/python-103-optional-sqlite.patch
> index a915c55..a20afc7 100644
> --- a/package/python/python-2.7-103-optional-sqlite.patch
> +++ b/package/python/python-103-optional-sqlite.patch
> @@ -8,12 +8,12 @@ Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> configure.in | 9 +++++++++
> 2 file changed, 9 insertions(+)
> -Index: Python-2.7.2/configure.in
> +Index: b/configure.ac
> ===================================================================
> ---- Python-2.7.2.orig/configure.in
> -+++ Python-2.7.2/configure.in
> -@@ -2407,6 +2407,15 @@
> - esac])
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -2613,6 +2613,15 @@
> + AC_CHECK_FUNCS(pthread_atfork)
> fi
> +AC_SUBST(SQLITE3)
> @@ -28,28 +28,33 @@ Index: Python-2.7.2/configure.in
> AC_SUBST(PYDOC)
> AC_ARG_ENABLE(pydoc,
> -Index: Python-2.7.2/Makefile.pre.in
> +Index: b/Makefile.pre.in
> ===================================================================
> ---- Python-2.7.2.orig/Makefile.pre.in
> -+++ Python-2.7.2/Makefile.pre.in
> -@@ -875,7 +874,7 @@
> - lib-tk/test/test_ttk test test/data \
> - test/cjkencodings test/decimaltestdata test/xmltestdata test/subprocessdata \
> - test/tracedmodules email/test email/test/data \
> -- json/tests sqlite3/test bsddb/test \
> -+ json/tests bsddb/test \
> - ctypes/test distutils/tests unittest/test
> - endif
> -
> -@@ -884,6 +882,13 @@
> - LIBSUBDIRS += pydoc_data
> +--- a/Makefile.pre.in
> ++++ b/Makefile.pre.in
> +@@ -939,7 +939,6 @@
> + encodings compiler hotshot \
> + email email/mime \
> + json \
> +- sqlite3 \
> + logging bsddb csv importlib wsgiref \
> + ctypes ctypes/macholib idlelib idlelib/Icons \
> + distutils distutils/command $(XMLLIBSUBDIRS) \
> +@@ -955,7 +954,6 @@
> + test/tracedmodules \
> + email/test email/test/data \
> + json/tests \
> +- sqlite3/test \
> + bsddb/test \
> + ctypes/test \
> + distutils/tests \
> +@@ -977,6 +975,11 @@
> + lib2to3/tests/data/fixers/myfixes
> endif
> +ifeq (@SQLITE3@,yes)
> +LIBSUBDIRS += sqlite3
> -+ifeq (@TEST_MODULES@,yes)
> -+LIBSUBDIRS += sqlite3/test
> -+endif
> ++TESTSUBDIRS += sqlite3/test
> +endif
> +
> libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
> diff --git a/package/python/python-2.7-104-optional-tk.patch b/package/python/python-104-optional-tk.patch
> similarity index 59%
> rename from package/python/python-2.7-104-optional-tk.patch
> rename to package/python/python-104-optional-tk.patch
> index 9333e33..3e0dd16 100644
> --- a/package/python/python-2.7-104-optional-tk.patch
> +++ b/package/python/python-104-optional-tk.patch
> @@ -8,49 +8,49 @@ Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> configure.in | 9 +++++++++
> 2 files changed, 19 insertions(+), 4 deletions(-)
> -Index: Python-2.7.2/Makefile.pre.in
> +Index: b/Makefile.pre.in
> ===================================================================
> ---- Python-2.7.2.orig/Makefile.pre.in
> -+++ Python-2.7.2/Makefile.pre.in
> -@@ -856,7 +856,7 @@
> +--- a/Makefile.pre.in
> ++++ b/Makefile.pre.in
> +@@ -934,8 +934,7 @@
> plat-mac/lib-scriptpackages/SystemEvents \
> - plat-mac/lib-scriptpackages/Terminal
> + plat-mac/lib-scriptpackages/Terminal
> PLATMACPATH=:plat-mac:plat-mac/lib-scriptpackages
> --LIBSUBDIRS= lib-tk site-packages \
> +-LIBSUBDIRS= lib-tk \
> +- site-packages \
> +LIBSUBDIRS= site-packages \
> encodings compiler hotshot \
> email email/mime \
> json \
> -@@ -870,8 +870,7 @@
> +@@ -947,9 +946,7 @@
> + lib-old \
> curses $(MACHDEPS)
> - ifeq (@TEST_MODULES@,yes)
> --LIBSUBDIRS += lib-tk/test lib-tk/test/test_tkinter \
> -- lib-tk/test/test_ttk test test/data \
> -+LIBSUBDIRS += test test/data \
> - test/cjkencodings test/decimaltestdata test/xmltestdata test/subprocessdata \
> - test/tracedmodules email/test email/test/data \
> - json/tests sqlite3/test bsddb/test \
> -@@ -899,6 +898,14 @@
> - endif
> +-TESTSUBDIRS = lib-tk/test lib-tk/test/test_tkinter \
> +- lib-tk/test/test_ttk \
> +- test test/audiodata test/data \
> ++TESTSUBDIRS = test test/audiodata test/data \
> + test/cjkencodings test/decimaltestdata test/xmltestdata test/subprocessdata \
> + test/tracedmodules \
> + email/test email/test/data \
> +@@ -980,6 +977,12 @@
> + TESTSUBDIRS += sqlite3/test
> endif
> +ifeq (@TK@,yes)
> +LIBSUBDIRS += lib-tk
> -+ifeq (@TEST_MODULES@,yes)
> -+LIBSUBDIRS += lib-tk/test lib-tk/test/test_tkinter \
> ++TESTSUBDIRS += lib-tk/test lib-tk/test/test_tkinter \
> + lib-tk/test/test_ttk
> +endif
> -+endif
> +
> libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
> @for i in $(SCRIPTDIR) $(LIBDEST); \
> do \
> -Index: Python-2.7.2/configure.in
> +Index: b/configure.ac
> ===================================================================
> ---- Python-2.7.2.orig/configure.in
> -+++ Python-2.7.2/configure.in
> -@@ -2416,6 +2416,15 @@
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -2622,6 +2622,15 @@
> DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _sqlite3"
> fi
> diff --git a/package/python/python-2.7-105-optional-curses.patch b/package/python/python-105-optional-curses.patch
> similarity index 75%
> rename from package/python/python-2.7-105-optional-curses.patch
> rename to package/python/python-105-optional-curses.patch
> index 7f8da7c..2ae4989 100644
> --- a/package/python/python-2.7-105-optional-curses.patch
> +++ b/package/python/python-105-optional-curses.patch
> @@ -8,21 +8,21 @@ Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> configure.in | 9 +++++++++
> 2 files changed, 14 insertions(+), 1 deletion(-)
> -Index: Python-2.7.2/Makefile.pre.in
> +Index: b/Makefile.pre.in
> ===================================================================
> ---- Python-2.7.2.orig/Makefile.pre.in
> -+++ Python-2.7.2/Makefile.pre.in
> -@@ -867,7 +867,7 @@
> +--- a/Makefile.pre.in
> ++++ b/Makefile.pre.in
> +@@ -944,7 +944,7 @@
> multiprocessing multiprocessing/dummy \
> unittest \
> lib-old \
> - curses $(MACHDEPS)
> + $(MACHDEPS)
> - ifeq (@TEST_MODULES@,yes)
> - LIBSUBDIRS += test test/data \
> -@@ -906,6 +906,10 @@
> - endif
> + TESTSUBDIRS = test test/audiodata test/data \
> + test/cjkencodings test/decimaltestdata test/xmltestdata test/subprocessdata \
> +@@ -983,6 +983,10 @@
> + lib-tk/test/test_ttk
> endif
> +ifeq (@CURSES@,yes)
> @@ -32,11 +32,11 @@ Index: Python-2.7.2/Makefile.pre.in
> libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
> @for i in $(SCRIPTDIR) $(LIBDEST); \
> do \
> -Index: Python-2.7.2/configure.in
> +Index: b/configure.ac
> ===================================================================
> ---- Python-2.7.2.orig/configure.in
> -+++ Python-2.7.2/configure.in
> -@@ -2425,6 +2425,15 @@
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -2631,6 +2631,15 @@
> DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _tkinter"
> fi
> diff --git a/package/python/python-2.7-106-optional-expat.patch b/package/python/python-106-optional-expat.patch
> similarity index 84%
> rename from package/python/python-2.7-106-optional-expat.patch
> rename to package/python/python-106-optional-expat.patch
> index 2d8ae74..9eee2cd 100644
> --- a/package/python/python-2.7-106-optional-expat.patch
> +++ b/package/python/python-106-optional-expat.patch
> @@ -15,20 +15,20 @@ Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> setup.py | 2 +-
> 3 files changed, 19 insertions(+), 7 deletions(-)
> -Index: Python-2.7.2/Makefile.pre.in
> +Index: b/Makefile.pre.in
> ===================================================================
> ---- Python-2.7.2.orig/Makefile.pre.in
> -+++ Python-2.7.2/Makefile.pre.in
> -@@ -863,7 +863,7 @@
> - sqlite3 \
> +--- a/Makefile.pre.in
> ++++ b/Makefile.pre.in
> +@@ -940,7 +940,7 @@
> + json \
> logging bsddb csv importlib wsgiref \
> ctypes ctypes/macholib idlelib idlelib/Icons \
> -- distutils distutils/command $(XMLLIBSUBDIRS) \
> +- distutils distutils/command $(XMLLIBSUBDIRS) \
> + distutils distutils/command \
> multiprocessing multiprocessing/dummy \
> unittest \
> lib-old \
> -@@ -910,6 +910,10 @@
> +@@ -987,6 +987,10 @@
> LIBSUBDIRS += curses
> endif
> @@ -39,11 +39,11 @@ Index: Python-2.7.2/Makefile.pre.in
> libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
> @for i in $(SCRIPTDIR) $(LIBDEST); \
> do \
> -Index: Python-2.7.2/configure.in
> +Index: b/configure.ac
> ===================================================================
> ---- Python-2.7.2.orig/configure.in
> -+++ Python-2.7.2/configure.in
> -@@ -2102,13 +2102,21 @@
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -2278,13 +2278,21 @@
> AC_SUBST(DISABLED_EXTENSIONS)
> # Check for use of the system expat library
> @@ -70,11 +70,11 @@ Index: Python-2.7.2/configure.in
> # Check for use of the system libffi library
> AC_MSG_CHECKING(for --with-system-ffi)
> -Index: Python-2.7.2/setup.py
> +Index: b/setup.py
> ===================================================================
> ---- Python-2.7.2.orig/setup.py
> -+++ Python-2.7.2/setup.py
> -@@ -1403,7 +1403,7 @@
> +--- a/setup.py
> ++++ b/setup.py
> +@@ -1457,7 +1457,7 @@
> #
> # More information on Expat can be found at www.libexpat.org.
> #
> diff --git a/package/python/python-2.7-107-optional-codecs-cjk.patch b/package/python/python-107-optional-codecs-cjk.patch
> similarity index 84%
> rename from package/python/python-2.7-107-optional-codecs-cjk.patch
> rename to package/python/python-107-optional-codecs-cjk.patch
> index 8ba61fe..1b3acac 100644
> --- a/package/python/python-2.7-107-optional-codecs-cjk.patch
> +++ b/package/python/python-107-optional-codecs-cjk.patch
> @@ -6,11 +6,11 @@ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> configure.in | 6 ++++++
> 1 file changed, 6 insertions(+)
> -Index: Python-2.7.2/configure.in
> +Index: b/configure.ac
> ===================================================================
> ---- Python-2.7.2.orig/configure.in
> -+++ Python-2.7.2/configure.in
> -@@ -2424,6 +2424,12 @@
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -2630,6 +2630,12 @@
> DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _sqlite3"
> fi
> diff --git a/package/python/python-2.7-108-optional-nis.patch b/package/python/python-108-optional-nis.patch
> similarity index 85%
> rename from package/python/python-2.7-108-optional-nis.patch
> rename to package/python/python-108-optional-nis.patch
> index 212f8d6..8749dfc 100644
> --- a/package/python/python-2.7-108-optional-nis.patch
> +++ b/package/python/python-108-optional-nis.patch
> @@ -9,11 +9,11 @@ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> configure.in | 6 ++++++
> 1 file changed, 6 insertions(+)
> -Index: Python-2.7.2/configure.in
> +Index: b/configure.ac
> ===================================================================
> ---- Python-2.7.2.orig/configure.in
> -+++ Python-2.7.2/configure.in
> -@@ -2430,6 +2430,12 @@
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -2636,6 +2636,12 @@
> DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _codecs_kr _codecs_jp _codecs_cn _codecs_tw _codecs_hk"
> fi])
> diff --git a/package/python/python-2.7-109-optional-unicodedata.patch b/package/python/python-109-optional-unicodedata.patch
> similarity index 83%
> rename from package/python/python-2.7-109-optional-unicodedata.patch
> rename to package/python/python-109-optional-unicodedata.patch
> index 229ba8c..2d78818 100644
> --- a/package/python/python-2.7-109-optional-unicodedata.patch
> +++ b/package/python/python-109-optional-unicodedata.patch
> @@ -6,11 +6,11 @@ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> configure.in | 6 ++++++
> 1 file changed, 6 insertions(+)
> -Index: Python-2.7.2/configure.in
> +Index: b/configure.ac
> ===================================================================
> ---- Python-2.7.2.orig/configure.in
> -+++ Python-2.7.2/configure.in
> -@@ -2436,6 +2436,12 @@
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -2642,6 +2642,12 @@
> DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} nis"
> fi])
> diff --git a/package/python/python-2.7-110-optional-db.patch b/package/python/python-110-optional-db.patch
> similarity index 75%
> rename from package/python/python-2.7-110-optional-db.patch
> rename to package/python/python-110-optional-db.patch
> index b32eea9..ea756da 100644
> --- a/package/python/python-2.7-110-optional-db.patch
> +++ b/package/python/python-110-optional-db.patch
> @@ -12,47 +12,44 @@ Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> configure.in | 22 ++++++++++++++++++++++
> 2 files changed, 30 insertions(+), 2 deletions(-)
> -Index: Python-2.7.2/Makefile.pre.in
> +Index: b/Makefile.pre.in
> ===================================================================
> ---- Python-2.7.2.orig/Makefile.pre.in
> -+++ Python-2.7.2/Makefile.pre.in
> -@@ -861,7 +861,7 @@
> +--- a/Makefile.pre.in
> ++++ b/Makefile.pre.in
> +@@ -938,7 +938,7 @@
> + encodings compiler hotshot \
> email email/mime \
> json \
> - sqlite3 \
> - logging bsddb csv importlib wsgiref \
> + logging csv importlib wsgiref \
> ctypes ctypes/macholib idlelib idlelib/Icons \
> distutils distutils/command \
> multiprocessing multiprocessing/dummy \
> -@@ -873,7 +873,7 @@
> - LIBSUBDIRS += test test/data \
> - test/cjkencodings test/decimaltestdata test/xmltestdata test/subprocessdata \
> - test/tracedmodules email/test email/test/data \
> -- json/tests bsddb/test \
> -+ json/tests \
> - ctypes/test distutils/tests unittest/test
> - endif
> -
> -@@ -914,6 +914,13 @@
> +@@ -951,7 +951,6 @@
> + test/tracedmodules \
> + email/test email/test/data \
> + json/tests \
> +- bsddb/test \
> + ctypes/test \
> + distutils/tests \
> + unittest/test
> +@@ -991,6 +990,11 @@
> LIBSUBDIRS += $(XMLLIBSUBDIRS)
> endif
> +ifeq (@BSDDB@,yes)
> +LIBSUBDIRS += bsddb
> -+ifeq (@TEST_MODULES@,yes)
> -+LIBSUBDIRS += bsddb/test
> -+endif
> ++TESTSUBDIRS += bsddb/test
> +endif
> +
> libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
> @for i in $(SCRIPTDIR) $(LIBDEST); \
> do \
> -Index: Python-2.7.2/configure.in
> +Index: b/configure.ac
> ===================================================================
> ---- Python-2.7.2.orig/configure.in
> -+++ Python-2.7.2/configure.in
> -@@ -2436,6 +2436,28 @@
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -2642,6 +2642,28 @@
> DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} nis"
> fi])
> diff --git a/package/python/python-2.7-111-optional-ssl.patch b/package/python/python-111-optional-ssl.patch
> similarity index 83%
> rename from package/python/python-2.7-111-optional-ssl.patch
> rename to package/python/python-111-optional-ssl.patch
> index 5885b4e..8d4599d 100644
> --- a/package/python/python-2.7-111-optional-ssl.patch
> +++ b/package/python/python-111-optional-ssl.patch
> @@ -6,11 +6,11 @@ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> configure.in | 6 ++++++
> 1 file changed, 6 insertions(+)
> -Index: Python-2.7.2/configure.in
> +Index: b/configure.ac
> ===================================================================
> ---- Python-2.7.2.orig/configure.in
> -+++ Python-2.7.2/configure.in
> -@@ -2436,6 +2436,12 @@
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -2642,6 +2642,12 @@
> DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} nis"
> fi])
> diff --git a/package/python/python-2.7-112-optional-bzip2.patch b/package/python/python-112-optional-bzip2.patch
> similarity index 83%
> rename from package/python/python-2.7-112-optional-bzip2.patch
> rename to package/python/python-112-optional-bzip2.patch
> index 83a2479..ba7dbaa 100644
> --- a/package/python/python-2.7-112-optional-bzip2.patch
> +++ b/package/python/python-112-optional-bzip2.patch
> @@ -5,11 +5,11 @@ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> configure.in | 6 ++++++
> 1 file changed, 6 insertions(+)
> -Index: Python-2.7.2/configure.in
> +Index: b/configure.ac
> ===================================================================
> ---- Python-2.7.2.orig/configure.in
> -+++ Python-2.7.2/configure.in
> -@@ -2442,6 +2442,12 @@
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -2648,6 +2648,12 @@
> DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} ssl"
> fi])
> diff --git a/package/python/python-2.7-113-optional-zlib.patch b/package/python/python-113-optional-zlib.patch
> similarity index 84%
> rename from package/python/python-2.7-113-optional-zlib.patch
> rename to package/python/python-113-optional-zlib.patch
> index f24eb17..19f100b 100644
> --- a/package/python/python-2.7-113-optional-zlib.patch
> +++ b/package/python/python-113-optional-zlib.patch
> @@ -5,11 +5,11 @@ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> configure.in | 6 ++++++
> 1 file changed, 6 insertions(+)
> -Index: Python-2.7.2/configure.in
> +Index: b/configure.ac
> ===================================================================
> ---- Python-2.7.2.orig/configure.in
> -+++ Python-2.7.2/configure.in
> -@@ -2448,6 +2448,12 @@
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -2654,6 +2654,12 @@
> DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} bz2"
> fi])
> diff --git a/package/python/python-2.7-001-support-for-build.patch b/package/python/python-2.7-001-support-for-build.patch
> deleted file mode 100644
> index b0430a4..0000000
> --- a/package/python/python-2.7-001-support-for-build.patch
> +++ /dev/null
> @@ -1,154 +0,0 @@
> -Add support in Python build system to specify host tools
> -
> -Python needs a Python interpreter and a "pgen" program to build
> -itself. Unfortunately, the Python build system assumes that it can use
> -the interpreter and pgen program it has just built to build
> -itself. Obviously, this cannot work in cross-compilation mode since
> -the interpreter and the pgen program have been built for the target.
> -
> -Therefore, this patch adds support in the Python build system for the
> -new PYTHON_FOR_BUILD and PGEN_FOR_BUILD variables, so that we can
> -point Python ./configure script to the Python interpreter and pgen
> -program that have been previously built for the host.
> -
> -Patch ported to python2.7 by Maxime Ripard <ripard@archos.com>, and
> -later significantly reworked by Thomas Petazzoni
> -<thomas.petazzoni@free-electrons.com>, with some inspiration taken
> -from the Python patches of the PTXdist project.
> -
> -Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ----
> - Makefile.pre.in | 32 +++++++++++++++++---------------
> - configure.in | 17 +++++++++++++++++
> - 2 files changed, 34 insertions(+), 15 deletions(-)
> -
> -Index: Python-2.7.2/Makefile.pre.in
> -===================================================================
> ---- Python-2.7.2.orig/Makefile.pre.in
> -+++ Python-2.7.2/Makefile.pre.in
> -@@ -181,7 +181,8 @@
> - UNICODE_OBJS= @UNICODE_OBJS@
> -
> - PYTHON= python$(EXE)
> --BUILDPYTHON= python$(BUILDEXE)
> -+BUILDPYTHON= ./python$(BUILDEXE)
> -+PYTHON_FOR_BUILD=@PYTHON_FOR_BUILD@
> -
> - # The task to run while instrument when building the profile-opt target
> - PROFILE_TASK= $(srcdir)/Tools/pybench/pybench.py -n 2 --with-gc --with-syscheck
> -@@ -213,7 +214,8 @@
> -
> - ##########################################################################
> - # Parser
> --PGEN= Parser/pgen$(EXE)
> -+BUILDPGEN= Parser/pgen$(EXE)
> -+PGEN_FOR_BUILD=@PGEN_FOR_BUILD@
> -
> - POBJS= \
> - Parser/acceler.o \
> -@@ -407,8 +409,8 @@
> - # Build the shared modules
> - sharedmods: $(BUILDPYTHON)
> - @case $$MAKEFLAGS in \
> -- *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \
> -- *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
> -+ *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py -q build;; \
> -+ *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py build;; \
> - esac
> -
> - # Build static library
> -@@ -540,13 +542,13 @@
> -
> - # Use a stamp file to prevent make -j invoking pgen twice
> - $(GRAMMAR_H) $(GRAMMAR_C): Parser/pgen.stamp
> --Parser/pgen.stamp: $(PGEN) $(GRAMMAR_INPUT)
> -+Parser/pgen.stamp: $(PGEN_FOR_BUILD) $(GRAMMAR_INPUT)
> - -@$(INSTALL) -d Include
> -- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
> -+ $(PGEN_FOR_BUILD) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
> - -touch Parser/pgen.stamp
> -
> --$(PGEN): $(PGENOBJS)
> -- $(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN)
> -+$(BUILDPGEN): $(PGENOBJS)
> -+ $(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(BUILDPGEN)
> -
> - Parser/grammar.o: $(srcdir)/Parser/grammar.c \
> - $(srcdir)/Include/token.h \
> -@@ -926,25 +928,25 @@
> - done
> - $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
> - PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
> -- ./$(BUILDPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
> -+ $(PYTHON_FOR_BUILD) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
> - -d $(LIBDEST) -f \
> - -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
> - $(DESTDIR)$(LIBDEST)
> - PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
> -- ./$(BUILDPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
> -+ $(PYTHON_FOR_BUILD) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
> - -d $(LIBDEST) -f \
> - -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
> - $(DESTDIR)$(LIBDEST)
> - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
> -- ./$(BUILDPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
> -+ $(PYTHON_FOR_BUILD) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
> - -d $(LIBDEST)/site-packages -f \
> - -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
> - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
> -- ./$(BUILDPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
> -+ $(PYTHON_FOR_BUILD) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
> - -d $(LIBDEST)/site-packages -f \
> - -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
> - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
> -- ./$(BUILDPYTHON) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()"
> -+ $(PYTHON_FOR_BUILD) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()"
> -
> - # Create the PLATDIR source directory, if one wasn't distributed..
> - $(srcdir)/Lib/$(PLATDIR):
> -@@ -1049,7 +1051,7 @@
> - # Install the dynamically loadable modules
> - # This goes into $(exec_prefix)
> - sharedinstall: sharedmods
> -- $(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py install \
> -+ $(RUNSHARED) $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py install \
> - --prefix=$(prefix) \
> - --install-scripts=$(BINDIR) \
> - --install-platlib=$(DESTSHARED) \
> -@@ -1188,7 +1190,7 @@
> - find . -name '*.gc??' -exec rm -f {} ';'
> -
> - clobber: clean profile-removal
> -- -rm -f $(BUILDPYTHON) $(PGEN) $(LIBRARY) $(LDLIBRARY) $(DLLLIBRARY) \
> -+ -rm -f $(BUILDPYTHON) $(BUILDPGEN) $(LIBRARY) $(LDLIBRARY) $(DLLLIBRARY) \
> - tags TAGS Parser/pgen.stamp \
> - config.cache config.log pyconfig.h Modules/config.c
> - -rm -rf build platform
> -Index: Python-2.7.2/configure.in
> -===================================================================
> ---- Python-2.7.2.orig/configure.in
> -+++ Python-2.7.2/configure.in
> -@@ -4305,6 +4305,23 @@
> - done
> - AC_MSG_RESULT(done)
> -
> -+if test "$cross_compiling" = "yes"; then
> -+ AC_MSG_CHECKING(python for build)
> -+ PYTHON_FOR_BUILD="${PYTHON_FOR_BUILD}"
> -+ AC_MSG_RESULT($PYTHON_FOR_BUILD)
> -+ AC_MSG_CHECKING(pgen for build)
> -+ PGEN_FOR_BUILD="${PGEN_FOR_BUILD}"
> -+ AC_MSG_RESULT($PGEN_FOR_BUILD)
> -+else
> -+ PYTHON_FOR_BUILD='$(BUILDPYTHON)'
> -+ PGEN_FOR_BUILD='$(BUILDPGEN)'
> -+fi
> -+
> -+AC_SUBST(PYTHON_FOR_BUILD)
> -+AC_SUBST(PGEN_FOR_BUILD)
> -+AC_ARG_VAR(PYTHON_FOR_BUILD,[build system Python])
> -+AC_ARG_VAR(PGEN_FOR_BUILD,[build system Python pgen])
> -+
> - # generate output files
> - AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc)
> - AC_CONFIG_FILES([Modules/ld_so_aix], [chmod +x Modules/ld_so_aix])
> diff --git a/package/python/python-2.7-002-cross-compile-variable.patch b/package/python/python-2.7-002-cross-compile-variable.patch
> deleted file mode 100644
> index f91ee71..0000000
> --- a/package/python/python-2.7-002-cross-compile-variable.patch
> +++ /dev/null
> @@ -1,55 +0,0 @@
> -Pass a CROSS_COMPILING variable to setup.py
> -
> -The setup.py script in the Python source code plays a significant role
> -in the Python build process. It is responsible for building all the
> -modules and extensions, and due to this, does various checks that need
> -to be adjusted when we are cross-compiling.
> -
> -For that reason, this patch makes sure that a CROSS_COMPILING variable
> -is passed in the environment of the setup.py script. Later patches in
> -the stack make use of this variable.
> -
> -Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ----
> - Makefile.pre.in | 6 +++---
> - configure.in | 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
> -@@ -409,8 +409,8 @@
> - # Build the shared modules
> - sharedmods: $(BUILDPYTHON)
> - @case $$MAKEFLAGS in \
> -- *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py -q build;; \
> -- *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py build;; \
> -+ *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' CROSS_COMPILING=@CROSS_COMPILING@ $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py -q build;; \
> -+ *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' CROSS_COMPILING=@CROSS_COMPILING@ $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py build;; \
> - esac
> -
> - # Build static library
> -@@ -1051,7 +1051,7 @@
> - # Install the dynamically loadable modules
> - # This goes into $(exec_prefix)
> - sharedinstall: sharedmods
> -- $(RUNSHARED) $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py install \
> -+ $(RUNSHARED) CROSS_COMPILING=@CROSS_COMPILING@ $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py install \
> - --prefix=$(prefix) \
> - --install-scripts=$(BINDIR) \
> - --install-platlib=$(DESTSHARED) \
> -Index: Python-2.7.2/configure.in
> -===================================================================
> ---- Python-2.7.2.orig/configure.in
> -+++ Python-2.7.2/configure.in
> -@@ -4322,6 +4322,9 @@
> - AC_ARG_VAR(PYTHON_FOR_BUILD,[build system Python])
> - AC_ARG_VAR(PGEN_FOR_BUILD,[build system Python pgen])
> -
> -+CROSS_COMPILING=$cross_compiling
> -+AC_SUBST(CROSS_COMPILING)
> -+
> - # generate output files
> - AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc)
> - AC_CONFIG_FILES([Modules/ld_so_aix], [chmod +x Modules/ld_so_aix])
> diff --git a/package/python/python-2.7-003-no-import-when-cross-compiling.patch b/package/python/python-2.7-003-no-import-when-cross-compiling.patch
> deleted file mode 100644
> index 17d6702..0000000
> --- a/package/python/python-2.7-003-no-import-when-cross-compiling.patch
> +++ /dev/null
> @@ -1,26 +0,0 @@
> -Disable import check when cross-compiling
> -
> -Once Python has compiled an extension (i.e some C code, potentially
> -linked to a library), it tries to import it. This cannot work in
> -cross-compilation mode, so we just disable this check.
> -
> -Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ----
> - setup.py | 4 ++++
> - 1 file changed, 4 insertions(+)
> -
> -Index: Python-2.7.2/setup.py
> -===================================================================
> ---- Python-2.7.2.orig/setup.py
> -+++ Python-2.7.2/setup.py
> -@@ -304,6 +304,10 @@
> - self.announce('WARNING: skipping import check for Cygwin-based "%s"'
> - % ext.name)
> - return
> -+ if os.environ.get('CROSS_COMPILING') == 'yes':
> -+ self.announce('WARNING: skipping import check for cross compiled "%s"'
> -+ % ext.name)
> -+ return
> - ext_filename = os.path.join(
> - self.build_lib,
> - self.get_ext_filename(self.get_ext_fullname(ext.name)))
> 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 c0c528a..0000000
> --- 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):
> diff --git a/package/python/python-2.7-005-staging-headers-libs.patch b/package/python/python-2.7-005-staging-headers-libs.patch
> deleted file mode 100644
> index cd378f2..0000000
> --- a/package/python/python-2.7-005-staging-headers-libs.patch
> +++ /dev/null
> @@ -1,38 +0,0 @@
> -Tell setup.py the location of headers/libraries
> -
> -Allow the libraries detection routine to look for headers and libs in
> -other directories than /usr/include or /usr/lib through the
> -environment variables PYTHON_MODULES_INCLUDE and PYTHON_MODULES_LIB.
> -
> -We can then use it to look for libraries in the buildroot staging
> -directory.
> -
> -Patch ported to python2.7 by Maxime Ripard <ripard@archos.com>
> ----
> - setup.py | 13 +++++++++++++
> - 1 file changed, 13 insertions(+)
> -
> -Index: Python-2.7.2/setup.py
> -===================================================================
> ---- Python-2.7.2.orig/setup.py
> -+++ Python-2.7.2/setup.py
> -@@ -372,6 +372,19 @@
> - os.unlink(tmpfile)
> -
> - def detect_modules(self):
> -+ try:
> -+ modules_include_dirs = os.environ["PYTHON_MODULES_INCLUDE"].split()
> -+ except KeyError:
> -+ modules_include_dirs = ['/usr/include']
> -+ try:
> -+ modules_lib_dirs = os.environ["PYTHON_MODULES_LIB"].split()
> -+ except KeyError:
> -+ modules_lib_dirs = ['/usr/lib']
> -+ for dir in modules_include_dirs:
> -+ add_dir_to_list(self.compiler.include_dirs, dir)
> -+ for dir in modules_lib_dirs:
> -+ add_dir_to_list(self.compiler.library_dirs, dir)
> -+
> - # Ensure that /usr/local is always used
> - if os.environ.get('CROSS_COMPILING') != 'yes':
> - add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
> diff --git a/package/python/python-2.7-006-disable-extensions.patch b/package/python/python-2.7-006-disable-extensions.patch
> deleted file mode 100644
> index f62a50f..0000000
> --- a/package/python/python-2.7-006-disable-extensions.patch
> +++ /dev/null
> @@ -1,102 +0,0 @@
> -Add infrastructure to disable the build of certain extensions
> -
> -Some of the extensions part of the Python core have dependencies on
> -external libraries (sqlite, tk, etc.) or are relatively big and not
> -necessarly always useful (CJK codecs for example). By extensions, we
> -mean part of Python modules that are written in C and therefore
> -compiled to binary code.
> -
> -Therefore, we introduce a small infrastructure that allows to disable
> -some of those extensions. This can be done inside the configure.in by
> -adding values to the DISABLED_EXTENSIONS variable (which is a
> -word-separated list of extensions).
> -
> -The implementation works as follow :
> -
> - * configure.in defines a DISABLED_EXTENSIONS variable, which is
> - substituted (so that when Makefile.pre is generated from
> - Makefile.pre.in, the value of the variable is substituted). For
> - now, this DISABLED_EXTENSIONS variable is empty, later patches will
> - use it.
> -
> - * Makefile.pre.in passes the DISABLED_EXTENSIONS value down to the
> - variables passed in the environment when calling the setup.py
> - script that actually builds and installs those extensions.
> -
> - * setup.py is modified so that the existing "disabled_module_list" is
> - filled with those pre-disabled extensions listed in
> - DISABLED_EXTENSIONS.
> -
> -Patch ported to python2.7 by Maxime Ripard <ripard@archos.com>, and
> -then extended by Thomas Petazzoni
> -<thomas.petazzoni@free-electrons.com>.
> -
> -Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ----
> - Makefile.pre.in | 8 +++++---
> - configure.in | 2 ++
> - setup.py | 5 ++++-
> - 3 files changed, 11 insertions(+), 4 deletions(-)
> -
> -Index: Python-2.7.2/Makefile.pre.in
> -===================================================================
> ---- Python-2.7.2.orig/Makefile.pre.in
> -+++ Python-2.7.2/Makefile.pre.in
> -@@ -144,6 +144,8 @@
> - # configure script arguments
> - CONFIG_ARGS= @CONFIG_ARGS@
> -
> -+# disabled extensions
> -+DISABLED_EXTENSIONS= @DISABLED_EXTENSIONS@
> -
> - # Subdirectories with code
> - SRCDIRS= @SRCDIRS@
> -@@ -409,8 +411,8 @@
> - # Build the shared modules
> - sharedmods: $(BUILDPYTHON)
> - @case $$MAKEFLAGS in \
> -- *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' CROSS_COMPILING=@CROSS_COMPILING@ $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py -q build;; \
> -- *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' CROSS_COMPILING=@CROSS_COMPILING@ $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py build;; \
> -+ *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;; \
> - esac
> -
> - # Build static library
> -@@ -1051,7 +1053,7 @@
> - # Install the dynamically loadable modules
> - # This goes into $(exec_prefix)
> - sharedinstall: sharedmods
> -- $(RUNSHARED) CROSS_COMPILING=@CROSS_COMPILING@ $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py install \
> -+ $(RUNSHARED) CROSS_COMPILING=@CROSS_COMPILING@ DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py install \
> - --prefix=$(prefix) \
> - --install-scripts=$(BINDIR) \
> - --install-platlib=$(DESTSHARED) \
> -Index: Python-2.7.2/configure.in
> -===================================================================
> ---- Python-2.7.2.orig/configure.in
> -+++ Python-2.7.2/configure.in
> -@@ -2098,6 +2098,8 @@
> -
> - AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
> -
> -+AC_SUBST(DISABLED_EXTENSIONS)
> -+
> - # Check for use of the system expat library
> - AC_MSG_CHECKING(for --with-system-expat)
> - AC_ARG_WITH(system_expat,
> -Index: Python-2.7.2/setup.py
> -===================================================================
> ---- Python-2.7.2.orig/setup.py
> -+++ Python-2.7.2/setup.py
> -@@ -21,7 +21,10 @@
> - COMPILED_WITH_PYDEBUG = hasattr(sys, 'gettotalrefcount')
> -
> - # This global variable is used to hold the list of modules to be disabled.
> --disabled_module_list = []
> -+try:
> -+ disabled_module_list = sysconfig.get_config_var("DISABLED_EXTENSIONS").split(" ")
> -+except KeyError:
> -+ disabled_module_list = list()
> -
> - def add_dir_to_list(dirlist, dir):
> - """Add the directory 'dir' to the list 'dirlist' (at the front) if
> diff --git a/package/python/python-2.7-007-do-not-generate-pyo-files.patch b/package/python/python-2.7-007-do-not-generate-pyo-files.patch
> deleted file mode 100644
> index 4ae5ef5..0000000
> --- a/package/python/python-2.7-007-do-not-generate-pyo-files.patch
> +++ /dev/null
> @@ -1,40 +0,0 @@
> -Do not generate .pyo files
> -
> -By default, the Python installation byte-compiles all modules in two
> -forms: the normal bytecode (.pyc) and an optimized bytecode (.pyo).
> -
> -According to
> -http://www.network-theory.co.uk/docs/pytut/CompiledPythonfiles.html,
> -the optimization do not do anything useful, and generating both the
> -"non-optimized" and "optimized" bytecode variants takes time.
> -
> -Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ----
> - Makefile.pre.in | 9 ---------
> - 1 file changed, 9 deletions(-)
> -
> -Index: Python-2.7.2/Makefile.pre.in
> -===================================================================
> ---- Python-2.7.2.orig/Makefile.pre.in
> -+++ Python-2.7.2/Makefile.pre.in
> -@@ -934,20 +934,11 @@
> - -d $(LIBDEST) -f \
> - -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
> - $(DESTDIR)$(LIBDEST)
> -- PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
> -- $(PYTHON_FOR_BUILD) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
> -- -d $(LIBDEST) -f \
> -- -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
> -- $(DESTDIR)$(LIBDEST)
> - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
> - $(PYTHON_FOR_BUILD) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
> - -d $(LIBDEST)/site-packages -f \
> - -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
> - -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
> -- $(PYTHON_FOR_BUILD) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
> -- -d $(LIBDEST)/site-packages -f \
> -- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
> -- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
> - $(PYTHON_FOR_BUILD) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()"
> -
> - # Create the PLATDIR source directory, if one wasn't distributed..
> 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 4ca22a4..0000000
> --- 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(" ")
> diff --git a/package/python/python-2.7-010-change-pyconfig-h-location.patch b/package/python/python-2.7-010-change-pyconfig-h-location.patch
> deleted file mode 100644
> index 9b95ddb..0000000
> --- a/package/python/python-2.7-010-change-pyconfig-h-location.patch
> +++ /dev/null
> @@ -1,76 +0,0 @@
> -Change the location of pyconfig.h
> -
> -The Python interpreter has a really strange behaviour: at *runtime*,
> -it reads a Makefile and a header file named pyconfig.h to get some
> -information about the configuration.
> -
> -The Makefile is located in usr/lib/python2.7/config, which is fine
> -since this location is kept on the target.
> -
> -However, by default, the pyconfig.h is installed in
> -usr/include/python2.7, but we completely remove the usr/include
> -directory for the target. Since making an exception just for
> -pyconfig.h is annoying, this patch also installs pyconfig.h to
> -usr/lib/python2.7/config, and modifies the sysconfig module so that it
> -looks in this location instead of usr/include.
> -
> -The pyconfig.h is still kept in usr/include/python2.7, because it is
> -needed in the $(STAGING_DIR) when building third-party Python
> -extensions that contain C code.
> -
> -Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> -
> ----
> - Lib/distutils/sysconfig.py | 3 ++-
> - Lib/sysconfig.py | 2 +-
> - Makefile.pre.in | 3 ++-
> - 3 files changed, 5 insertions(+), 3 deletions(-)
> -
> -Index: Python-2.7.2/Lib/distutils/sysconfig.py
> -===================================================================
> ---- Python-2.7.2.orig/Lib/distutils/sysconfig.py
> -+++ Python-2.7.2/Lib/distutils/sysconfig.py
> -@@ -193,7 +193,8 @@
> - else:
> - inc_dir = project_base
> - else:
> -- inc_dir = get_python_inc(plat_specific=1)
> -+ lib_dir = get_python_lib(plat_specific=1, standard_lib=1)
> -+ inc_dir = os.path.join(lib_dir, "config")
> - if get_python_version() < '2.2':
> - config_h = 'config.h'
> - else:
> -Index: Python-2.7.2/Lib/sysconfig.py
> -===================================================================
> ---- Python-2.7.2.orig/Lib/sysconfig.py
> -+++ Python-2.7.2/Lib/sysconfig.py
> -@@ -356,7 +356,7 @@
> - else:
> - inc_dir = _PROJECT_BASE
> - else:
> -- inc_dir = get_path('platinclude')
> -+ inc_dir = os.path.join(get_path('stdlib'), "config")
> - return os.path.join(inc_dir, 'pyconfig.h')
> -
> - def get_scheme_names():
> -Index: Python-2.7.2/Makefile.pre.in
> -===================================================================
> ---- Python-2.7.2.orig/Makefile.pre.in
> -+++ Python-2.7.2/Makefile.pre.in
> -@@ -972,7 +972,6 @@
> - echo $(INSTALL_DATA) $$i $(INCLUDEPY); \
> - $(INSTALL_DATA) $$i $(DESTDIR)$(INCLUDEPY); \
> - done
> -- $(INSTALL_DATA) pyconfig.h $(DESTDIR)$(CONFINCLUDEPY)/pyconfig.h
> -
> - # Install the library and miscellaneous stuff needed for extending/embedding
> - # This goes into $(exec_prefix)
> -@@ -1006,6 +1005,8 @@
> - $(INSTALL_DATA) Modules/python.o $(DESTDIR)$(LIBPL)/python.o
> - $(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config.c.in
> - $(INSTALL_DATA) Makefile $(DESTDIR)$(LIBPL)/Makefile
> -+ $(INSTALL_DATA) pyconfig.h $(DESTDIR)$(LIBPL)/pyconfig.h
> -+ $(INSTALL_DATA) pyconfig.h $(DESTDIR)$(CONFINCLUDEPY)/pyconfig.h
> - $(INSTALL_DATA) Modules/Setup $(DESTDIR)$(LIBPL)/Setup
> - $(INSTALL_DATA) Modules/Setup.local $(DESTDIR)$(LIBPL)/Setup.local
> - $(INSTALL_DATA) Modules/Setup.config $(DESTDIR)$(LIBPL)/Setup.config
> diff --git a/package/python/python-2.7-011-no-rpath.patch b/package/python/python-2.7-011-no-rpath.patch
> deleted file mode 100644
> index 3422dce..0000000
> --- a/package/python/python-2.7-011-no-rpath.patch
> +++ /dev/null
> @@ -1,75 +0,0 @@
> -Remove runtime library paths
> -
> -For some extensions (bsddb, sqlite and dbm), Python setup.py script
> -hardcode a runtime path (rpath) into the extension. However, this
> -runtime path is incorrect (because it points to the location of the
> -library directory on the development machine) and useless (because on
> -the target, all useful libraries are in a standard directory searched
> -by the dynamic loader). For those reasons, we just get rid of the
> -runtime paths in cross-compilation mode.
> -
> -Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ----
> - setup.py | 21 ++++++++++++++++++---
> - 1 file changed, 18 insertions(+), 3 deletions(-)
> -
> -Index: Python-2.7.2/setup.py
> -===================================================================
> ---- Python-2.7.2.orig/setup.py
> -+++ Python-2.7.2/setup.py
> -@@ -997,6 +997,12 @@
> - print "bsddb lib dir:", dblib_dir, " inc dir:", db_incdir
> - db_incs = [db_incdir]
> - dblibs = [dblib]
> -+
> -+ if os.environ.get('CROSS_COMPILING') == 'yes':
> -+ bsddb_runtime_library_dir = None
> -+ else:
> -+ bsddb_runtime_library_dir = dblib_dir
> -+
> - # We add the runtime_library_dirs argument because the
> - # BerkeleyDB lib we're linking against often isn't in the
> - # system dynamic library search path. This is usually
> -@@ -1006,7 +1012,7 @@
> - exts.append(Extension('_bsddb', ['_bsddb.c'],
> - depends = ['bsddb.h'],
> - library_dirs=dblib_dir,
> -- runtime_library_dirs=dblib_dir,
> -+ runtime_library_dirs=bsddb_runtime_library_dir,
> - include_dirs=db_incs,
> - libraries=dblibs))
> - else:
> -@@ -1112,12 +1118,17 @@
> - else:
> - sqlite_extra_link_args = ()
> -
> -+ if os.environ.get('CROSS_COMPILING') == 'yes':
> -+ sqlite_runtime_library_dirs = None
> -+ else:
> -+ sqlite_runtime_library_dirs = sqlite_libdir
> -+
> - exts.append(Extension('_sqlite3', sqlite_srcs,
> - define_macros=sqlite_defines,
> - include_dirs=["Modules/_sqlite",
> - sqlite_incdir],
> - library_dirs=sqlite_libdir,
> -- runtime_library_dirs=sqlite_libdir,
> -+ runtime_library_dirs=sqlite_runtime_library_dirs,
> - extra_link_args=sqlite_extra_link_args,
> - libraries=["sqlite3",]))
> - else:
> -@@ -1218,9 +1229,13 @@
> - elif cand == "bdb":
> - if db_incs is not None:
> - print "building dbm using bdb"
> -+ if os.environ.get('CROSS_COMPILING') == 'yes':
> -+ db_runtime_library_dir = None
> -+ else:
> -+ db_runtime_library_dir = dblib_dir
> - dbmext = Extension('dbm', ['dbmmodule.c'],
> - library_dirs=dblib_dir,
> -- runtime_library_dirs=dblib_dir,
> -+ runtime_library_dirs=db_runtime_library_dir,
> - include_dirs=db_incs,
> - define_macros=[
> - ('HAVE_BERKDB_H', None),
> diff --git a/package/python/python-2.7-012-correct-32bit-64bit-check.patch b/package/python/python-2.7-012-correct-32bit-64bit-check.patch
> deleted file mode 100644
> index bfccbfd..0000000
> --- a/package/python/python-2.7-012-correct-32bit-64bit-check.patch
> +++ /dev/null
> @@ -1,55 +0,0 @@
> -Use correct mechanism to determine 32/64 bits
> -
> -Python setup.py builds certain extensions (dl and imageop) only on 32
> -bits architecture. However, to test whether the architecture is 32
> -bits or not, it was looking at the sys.maxint value of the host Python
> -interpreter... which might run on a 64 bits architecture even though
> -the target is 32 bits, or which might run on a 32 bits architecture
> -even though the target is 64 bits.
> -
> -Therefore, we introduce a is_arch_64_bits() function, which looks at
> -the pyconfig.h file generated by ./configure for the value of
> -SIZEOF_LONG to determine if the architecture is 32 or 64 bits.
> -
> -Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ----
> - setup.py | 12 ++++++++++--
> - 1 file changed, 10 insertions(+), 2 deletions(-)
> -
> -Index: Python-2.7.2/setup.py
> -===================================================================
> ---- Python-2.7.2.orig/setup.py
> -+++ Python-2.7.2/setup.py
> -@@ -29,6 +29,14 @@
> - except KeyError:
> - disabled_module_list = list()
> -
> -+def is_arch_64_bits():
> -+ data = open('pyconfig.h').read()
> -+ m = re.search(r"#s*define\s+SIZEOF_LONG\s+4\s*", data)
> -+ if m is None:
> -+ return True
> -+ else:
> -+ return False
> -+
> - def add_dir_to_list(dirlist, dir):
> - """Add the directory 'dir' to the list 'dirlist' (at the front) if
> - 1) 'dir' is not already in 'dirlist'
> -@@ -628,7 +636,7 @@
> - exts.append( Extension('audioop', ['audioop.c']) )
> -
> - # Disabled on 64-bit platforms
> -- if sys.maxint != 9223372036854775807L:
> -+ if not is_arch_64_bits():
> - # Operations on images
> - exts.append( Extension('imageop', ['imageop.c']) )
> - else:
> -@@ -1444,7 +1452,7 @@
> - missing.append('_codecs_%s' % loc)
> -
> - # Dynamic loading module
> -- if sys.maxint == 0x7fffffff:
> -+ if not is_arch_64_bits():
> - # This requires sizeof(int) == sizeof(long) == sizeof(char*)
> - dl_inc = find_file('dlfcn.h', [], inc_dirs)
> - if (dl_inc is not None) and (platform not in ['atheos']):
> diff --git a/package/python/python-2.7-013-fix-linux-3-compilation.patch b/package/python/python-2.7-013-fix-linux-3-compilation.patch
> deleted file mode 100644
> index e834b9f..0000000
> --- a/package/python/python-2.7-013-fix-linux-3-compilation.patch
> +++ /dev/null
> @@ -1,24 +0,0 @@
> -Index: Python-2.7.2/configure
> -===================================================================
> ---- Python-2.7.2.orig/configure
> -+++ Python-2.7.2/configure
> -@@ -3007,6 +3007,7 @@
> - darwin*) MACHDEP="darwin";;
> - atheos*) MACHDEP="atheos";;
> - irix646) MACHDEP="irix6";;
> -+ linux*) MACHDEP="linux2";;
> - '') MACHDEP="unknown";;
> - esac
> - fi
> -Index: Python-2.7.2/configure.in
> -===================================================================
> ---- Python-2.7.2.orig/configure.in
> -+++ Python-2.7.2/configure.in
> -@@ -297,6 +297,7 @@
> - darwin*) MACHDEP="darwin";;
> - atheos*) MACHDEP="atheos";;
> - irix646) MACHDEP="irix6";;
> -+ linux*) MACHDEP="linux2";;
> - '') MACHDEP="unknown";;
> - esac
> - fi
> diff --git a/package/python/python-2.7-014-verbose-module-build.patch b/package/python/python-2.7-014-verbose-module-build.patch
> deleted file mode 100644
> index ea81e55..0000000
> --- a/package/python/python-2.7-014-verbose-module-build.patch
> +++ /dev/null
> @@ -1,19 +0,0 @@
> -Enables verbose output when building modules
> -
> -Patch borrowed from OpenBricks.
> -
> -Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> -
> -Index: Python-2.7.2/Makefile.pre.in
> -===================================================================
> ---- Python-2.7.2.orig/Makefile.pre.in
> -+++ Python-2.7.2/Makefile.pre.in
> -@@ -411,7 +411,7 @@
> - # 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)" CONFIG_ARGS="$(CONFIG_ARGS)" $(PYTHON_FOR_BUILD) -E $(srcdir)/setup.py -q 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 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
> -
> diff --git a/package/python/python-2.7-015-distutils-cross-compilation-support.patch b/package/python/python-2.7-015-distutils-cross-compilation-support.patch
> deleted file mode 100644
> index 7fd404e..0000000
> --- a/package/python/python-2.7-015-distutils-cross-compilation-support.patch
> +++ /dev/null
> @@ -1,125 +0,0 @@
> -Add some cross-compilation fixes to distutils
> -
> -Inspired by work done by Marc Kleine-Budde <mkl@pengutronix.de> in
> -PTXdist.
> -
> -Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ----
> - Lib/distutils/sysconfig.py | 7 ++++---
> - 1 files changed, 4 insertions(+), 3 deletions(-)
> -
> -Index: b/Lib/distutils/sysconfig.py
> -===================================================================
> ---- a/Lib/distutils/sysconfig.py
> -+++ b/Lib/distutils/sysconfig.py
> -@@ -18,14 +18,38 @@
> -
> - from distutils.errors import DistutilsPlatformError
> -
> --# These are needed in a couple of spots, so just compute them once.
> --PREFIX = os.path.normpath(sys.prefix)
> --EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
> -+if os.environ.get('CROSS_COMPILING') == 'yes':
> -+ _sysroot=os.environ.get('_python_sysroot')
> -+ PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_prefix'))
> -+ EXEC_PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_exec_prefix'))
> -+ # In the cross-compilation case, we have two cases:
> -+ #
> -+ # 1/ We're currently cross-compiling Python itself. In this case,
> -+ # EXECUTABLE_DIRNAME should point to the source directory of the
> -+ # target Python, so that the rest of the code, especially the
> -+ # _python_build() function will properly understand that we are
> -+ # building Python itself. In this case, _python_srcdir is
> -+ # defined.
> -+ #
> -+ # 2/ We're currently cross-compiling third party Python
> -+ # modules. In this case, EXECUTABLE_DIRNAME should point to where
> -+ # the target python executable is installed in the sysroot, so
> -+ # that the proper Makefile is going to be read. In this case,
> -+ # _python_srcdir is not defined.
> -+ #
> -+ if os.environ.get('_python_srcdir') is not None:
> -+ EXECUTABLE_DIRNAME = os.environ.get('_python_srcdir')
> -+ else:
> -+ EXECUTABLE_DIRNAME = os.path.join(_sysroot, "usr/bin")
> -+else:
> -+ PREFIX = os.path.normpath(sys.prefix)
> -+ EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
> -+ EXECUTABLE_DIRNAME = os.path.dirname(os.path.realpath(sys.executable))
> -
> - # Path to the base directory of the project. On Windows the binary may
> - # live in project/PCBuild9. If we're dealing with an x64 Windows build,
> - # it'll live in project/PCbuild/amd64.
> --project_base = os.path.dirname(os.path.abspath(sys.executable))
> -+project_base = EXECUTABLE_DIRNAME
> - if os.name == "nt" and "pcbuild" in project_base[-8:].lower():
> - project_base = os.path.abspath(os.path.join(project_base, os.path.pardir))
> - # PC/VS7.1
> -@@ -74,7 +98,7 @@
> -
> - if os.name == "posix":
> - if python_build:
> -- buildir = os.path.dirname(sys.executable)
> -+ buildir = EXECUTABLE_DIRNAME
> - if plat_specific:
> - # python.h is located in the buildir
> - inc_dir = buildir
> -@@ -245,7 +269,7 @@
> - def get_makefile_filename():
> - """Return full pathname of installed Makefile from the Python build."""
> - if python_build:
> -- return os.path.join(os.path.dirname(sys.executable), "Makefile")
> -+ return os.path.join(EXECUTABLE_DIRNAME, "Makefile")
> - lib_dir = get_python_lib(plat_specific=1, standard_lib=1)
> - return os.path.join(lib_dir, "config", "Makefile")
> -
> -@@ -311,6 +335,11 @@
> - # `$$' is a literal `$' in make
> - tmpv = v.replace('$$', '')
> -
> -+ # Adjust prefix and exec_prefix when we're cross compiling
> -+ if os.environ.get('CROSS_COMPILING') == "yes":
> -+ if n == "prefix" or n == "exec_prefix":
> -+ v = _sysroot + v
> -+
> - if "$" in tmpv:
> - notdone[n] = v
> - else:
> -Index: b/configure.in
> -===================================================================
> ---- a/configure.in
> -+++ b/configure.in
> -@@ -4342,6 +4342,20 @@
> - CROSS_COMPILING=$cross_compiling
> - AC_SUBST(CROSS_COMPILING)
> -
> -+#
> -+# Cross compiling
> -+#
> -+# special RUNSHARED
> -+if test "$cross_compiling" = "yes"; then
> -+ RUNSHARED="\
> -+ CROSS_COMPILING=yes \
> -+ _python_cross_host=${ac_cv_host} \
> -+ _python_srcdir=\"\$(srcdir)\" \
> -+ _python_prefix=\"\$(prefix)\" \
> -+ _python_exec_prefix=\"\$(exec_prefix)\""
> -+fi
> -+
> -+
> - # generate output files
> - AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc)
> - AC_CONFIG_FILES([Modules/ld_so_aix], [chmod +x Modules/ld_so_aix])
> -Index: b/Lib/distutils/command/build_ext.py
> -===================================================================
> ---- a/Lib/distutils/command/build_ext.py
> -+++ b/Lib/distutils/command/build_ext.py
> -@@ -237,7 +237,7 @@
> - if ((sys.platform.startswith('linux') or sys.platform.startswith('gnu')
> - or sys.platform.startswith('sunos'))
> - and sysconfig.get_config_var('Py_ENABLE_SHARED')):
> -- if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")):
> -+ if not sysconfig.python_build:
> - # building third party extensions
> - self.library_dirs.append(sysconfig.get_config_var('LIBDIR'))
> - else:
> diff --git a/package/python/python-2.7-016-cross-compile-getaddrinfo.patch b/package/python/python-2.7-016-cross-compile-getaddrinfo.patch
> deleted file mode 100644
> index dae3005..0000000
> --- a/package/python/python-2.7-016-cross-compile-getaddrinfo.patch
> +++ /dev/null
> @@ -1,15 +0,0 @@
> -Disable buggy_getaddrinfo configure test when cross-compiling with IPv6 support
> -
> -Signed-off-by: Vanya Sergeev <vsergeev@gmail.com>
> -
> ---- python-2.7.2.orig/configure.in 2012-04-22 06:52:09.361809545 -0400
> -+++ python-2.7.2/configure.in 2012-04-22 06:56:37.900634194 -0400
> -@@ -3128,7 +3128,7 @@
> -
> - AC_MSG_RESULT($ac_cv_buggy_getaddrinfo)
> -
> --if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
> -+if test $have_getaddrinfo = no || test "$cross_compiling" != "yes" -a "$ac_cv_buggy_getaddrinfo" = yes
> - then
> - if test $ipv6 = yes
> - then
> diff --git a/package/python/python.mk b/package/python/python.mk
> index f2e48c4..0469820 100644
> --- a/package/python/python.mk
> +++ b/package/python/python.mk
> @@ -5,16 +5,15 @@
> ################################################################################
> PYTHON_VERSION_MAJOR = 2.7
> -PYTHON_VERSION = $(PYTHON_VERSION_MAJOR).3
> +PYTHON_VERSION = $(PYTHON_VERSION_MAJOR).6
> PYTHON_SOURCE = Python-$(PYTHON_VERSION).tar.xz
> PYTHON_SITE = http://python.org/ftp/python/$(PYTHON_VERSION)
> PYTHON_LICENSE = Python software foundation license v2, others
> PYTHON_LICENSE_FILES = LICENSE
> -# Python needs itself and a "pgen" program to build itself, both being
> -# provided in the Python sources. So in order to cross-compile Python,
> -# we need to build a host Python first. This host Python is also
> -# installed in $(HOST_DIR), as it is needed when cross-compiling
> +# Python needs itself to be built, so in order to cross-compile
> +# Python, we need to build a host Python first. This host Python is
> +# also installed in $(HOST_DIR), as it is needed when cross-compiling
> # third-party Python modules.
> HOST_PYTHON_CONF_OPT += \
> @@ -32,12 +31,8 @@ HOST_PYTHON_CONF_OPT += \
> --disable-bsddb \
> --disable-test-modules \
> --disable-bz2 \
> - --disable-ssl
> -
> -HOST_PYTHON_MAKE_ENV = \
> - PYTHON_MODULES_INCLUDE=$(HOST_DIR)/usr/include \
> - PYTHON_MODULES_LIB="$(HOST_DIR)/lib $(HOST_DIR)/usr/lib"
> -
> + --disable-ssl \
> + --disable-pyo-build
> # Building host python in parallel sometimes triggers a "Bus error"
> # during the execution of "./python setup.py build" in the
> @@ -51,12 +46,6 @@ PYTHON_DEPENDENCIES = host-python libffi
> HOST_PYTHON_DEPENDENCIES = host-expat host-zlib
> -define HOST_PYTHON_INSTALL_PGEN
> - $(INSTALL) -m0755 -D $(@D)/Parser/pgen $(HOST_DIR)/usr/bin/python-pgen
> -endef
> -
> -HOST_PYTHON_POST_INSTALL_HOOKS += HOST_PYTHON_INSTALL_PGEN
> -
> PYTHON_INSTALL_STAGING = YES
> ifeq ($(BR2_PACKAGE_PYTHON_READLINE),y)
> @@ -124,14 +113,9 @@ PYTHON_DEPENDENCIES += openssl
> endif
> PYTHON_CONF_ENV += \
> - PYTHON_FOR_BUILD=$(HOST_DIR)/usr/bin/python \
> - PGEN_FOR_BUILD=$(HOST_DIR)/usr/bin/python-pgen \
> - ac_cv_have_long_long_format=yes
> -
> -PYTHON_MAKE_ENV += \
> - _python_sysroot=$(STAGING_DIR) \
> - PYTHON_MODULES_INCLUDE=$(STAGING_DIR)/usr/include \
> - PYTHON_MODULES_LIB="$(STAGING_DIR)/lib $(STAGING_DIR)/usr/lib"
> + ac_cv_have_long_long_format=yes \
> + ac_cv_file__dev_ptmx=yes \
> + ac_cv_file__dev_ptc=yes
> PYTHON_CONF_OPT += \
> --without-cxx-main \
> @@ -143,7 +127,18 @@ PYTHON_CONF_OPT += \
> --disable-gdbm \
> --disable-tk \
> --disable-nis \
> - --disable-dbm
> + --disable-dbm \
> + --disable-pyo-build
> +
> +# This is needed to make sure the Python build process doesn't try to
> +# regenerate those files with the pgen program. Otherwise, it builds
> +# pgen for the target, and tries to run it on the host.
> +
> +define PYTHON_TOUCH_GRAMMAR_FILES
> + touch $(@D)/Include/graminit.h $(@D)/Python/graminit.c
> +endef
> +
> +PYTHON_POST_PATCH_HOOKS += PYTHON_TOUCH_GRAMMAR_FILES
> #
> # Remove useless files. In the config/ directory, only the Makefile
> @@ -168,7 +163,7 @@ PYTHON_POST_INSTALL_TARGET_HOOKS += PYTHON_REMOVE_USELESS_FILES
> PYTHON_AUTORECONF = YES
> # Provided to other packages
> -PYTHON_PATH = $(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages/
> +PYTHON_PATH = $(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/sysconfigdata/:$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages/
> $(eval $(autotools-package))
> $(eval $(host-autotools-package))
> --
> 1.8.3.2
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 36+ messages in thread
* [Buildroot] [PATCHv1 05/26] pkg-python: simplifications after the Python 2.x bump
2014-02-13 20:48 ` [Buildroot] [PATCHv1 05/26] pkg-python: simplifications after the Python 2.x bump Thomas Petazzoni
@ 2014-02-14 20:59 ` Peter Korsgaard
0 siblings, 0 replies; 36+ messages in thread
From: Peter Korsgaard @ 2014-02-14 20:59 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
> Thanks to the Python 2.x bump, it is no longer needed to pass
> PYTHONCPREFIX, and CROSS_COMPILING when building third-party Python
> modules.
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Committed to next, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 36+ messages in thread
* [Buildroot] [PATCHv1 06/26] core: remove .py/.pyc for Python
2014-02-13 20:48 ` [Buildroot] [PATCHv1 06/26] core: remove .py/.pyc for Python Thomas Petazzoni
@ 2014-02-14 20:59 ` Peter Korsgaard
0 siblings, 0 replies; 36+ messages in thread
From: Peter Korsgaard @ 2014-02-14 20:59 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
> The main Buildroot Makefile was removing *.py or *.pyc if Python 2 was
> enabled, but for Python 3, this action was taken care of by a post
> install target hook of python3.mk, which means it wouldn't work with
> external modules (the .py/.pyc removal would be done before external
> Python modules are installed).
> We fix this by making the global *.py/*.pyc removal in the main
> Makefile work for both Python 2 and Python 3.
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Committed to next, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 36+ messages in thread
* [Buildroot] [PATCHv1 07/26] pkg-python: no longer use distutilscross for setuptools
2014-02-13 20:48 ` [Buildroot] [PATCHv1 07/26] pkg-python: no longer use distutilscross for setuptools Thomas Petazzoni
@ 2014-02-14 21:03 ` Peter Korsgaard
0 siblings, 0 replies; 36+ messages in thread
From: Peter Korsgaard @ 2014-02-14 21:03 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
> Thanks to the bump of Python 2.x, distutilscross is no longer needed
> to achieve cross-compilation for setuptools packages. The host Python
> 2.x interpreter can be tricked into using the target compiler thanks
> to pointing it to a different sysconfigdata module, which is achieved
> using PYTHON_PATH.
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This no longer applies after Fabio's parallel make series. Could you
please rebase and send a v2?
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 36+ messages in thread
end of thread, other threads:[~2014-02-14 21:03 UTC | newest]
Thread overview: 36+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-13 20:48 [Buildroot] [PATCHv1 00/26] Python 2 and 3 bumps, support for Python 3 external modules Thomas Petazzoni
2014-02-13 20:48 ` [Buildroot] [PATCHv1 01/26] python: expose PYTHON_PATH Thomas Petazzoni
2014-02-14 20:52 ` Peter Korsgaard
2014-02-13 20:48 ` [Buildroot] [PATCHv1 02/26] pkg-python: use the newly defined PYTHON_PATH variable Thomas Petazzoni
2014-02-14 20:55 ` Peter Korsgaard
2014-02-13 20:48 ` [Buildroot] [PATCHv1 03/26] pkg-python: also pass PYTHONPATH when building distutils packages Thomas Petazzoni
2014-02-14 20:58 ` Peter Korsgaard
2014-02-13 20:48 ` [Buildroot] [PATCHv1 04/26] python: bump to 2.7.6 Thomas Petazzoni
2014-02-14 20:59 ` Peter Korsgaard
2014-02-13 20:48 ` [Buildroot] [PATCHv1 05/26] pkg-python: simplifications after the Python 2.x bump Thomas Petazzoni
2014-02-14 20:59 ` Peter Korsgaard
2014-02-13 20:48 ` [Buildroot] [PATCHv1 06/26] core: remove .py/.pyc for Python Thomas Petazzoni
2014-02-14 20:59 ` Peter Korsgaard
2014-02-13 20:48 ` [Buildroot] [PATCHv1 07/26] pkg-python: no longer use distutilscross for setuptools Thomas Petazzoni
2014-02-14 21:03 ` Peter Korsgaard
2014-02-13 20:48 ` [Buildroot] [PATCHv1 08/26] python-distutilscross: remove package that is no longer needed Thomas Petazzoni
2014-02-13 20:48 ` [Buildroot] [PATCHv1 09/26] python3: removal of *.py/*.pyc is now done globally Thomas Petazzoni
2014-02-13 20:48 ` [Buildroot] [PATCHv1 10/26] python3: make it exclusive from python Thomas Petazzoni
2014-02-13 20:49 ` [Buildroot] [PATCHv1 11/26] python3: add python -> python3 symlink for the host variant Thomas Petazzoni
2014-02-13 20:49 ` [Buildroot] [PATCHv1 12/26] python3: add config directory symbolic link Thomas Petazzoni
2014-02-13 21:54 ` Samuel Martin
2014-02-13 20:49 ` [Buildroot] [PATCHv1 13/26] python3: use proper PYTHON3_VERSION_MAJOR instead of harcoding 3.3 Thomas Petazzoni
2014-02-13 20:49 ` [Buildroot] [PATCHv1 14/26] python3: bump to 3.4.0rc1 Thomas Petazzoni
2014-02-13 20:49 ` [Buildroot] [PATCHv1 15/26] python3: provide a PYTHON3_PATH Thomas Petazzoni
2014-02-13 20:49 ` [Buildroot] [PATCHv1 16/26] package: add python3 support in the package infrastructure Thomas Petazzoni
2014-02-13 20:49 ` [Buildroot] [PATCHv1 17/26] package: allow Python packages with Python3 Thomas Petazzoni
2014-02-13 20:49 ` [Buildroot] [PATCHv1 18/26] python, python3: enable unicodedata for host-python, needed by setuptools Thomas Petazzoni
2014-02-13 20:49 ` [Buildroot] [PATCHv1 19/26] python-setuptools: bump version to 2.1.2 Thomas Petazzoni
2014-02-13 20:49 ` [Buildroot] [PATCHv1 20/26] python, python3: fix to ensure libpython is stripped Thomas Petazzoni
2014-02-13 20:49 ` [Buildroot] [PATCHv1 21/26] python-pyasn: use the real upstream Thomas Petazzoni
2014-02-13 20:49 ` [Buildroot] [PATCHv1 22/26] python-bottle: allow to build with Python 3 Thomas Petazzoni
2014-02-13 20:49 ` [Buildroot] [PATCHv1 23/26] python-serial: " Thomas Petazzoni
2014-02-13 20:49 ` [Buildroot] [PATCHv1 24/26] python-pyasn: " Thomas Petazzoni
2014-02-13 20:49 ` [Buildroot] [PATCHv1 25/26] python-pycrypto: " Thomas Petazzoni
2014-02-13 20:49 ` [Buildroot] [PATCHv1 26/26] python-pysnmp{, -apps, -mibs}: " Thomas Petazzoni
2014-02-13 20:55 ` [Buildroot] [PATCHv1 00/26] Python 2 and 3 bumps, support for Python 3 external modules Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox