diff options
author | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2014-02-18 21:40:01 +0100 |
---|---|---|
committer | Peter Korsgaard <peter@korsgaard.com> | 2014-02-18 23:22:18 +0100 |
commit | 0d327c267a57e3a75b10becde772addb7fc49297 (patch) | |
tree | 31a2ffa5ec6c7b3d002fa156d81321b3c1f867cf /package/python3/python3.mk | |
parent | 249778541b68c10156c6687e14888f6047556922 (diff) | |
download | buildroot-0d327c267a57e3a75b10becde772addb7fc49297.tar.gz buildroot-0d327c267a57e3a75b10becde772addb7fc49297.zip |
python3: bump to 3.4.0rc1
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 at 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>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'package/python3/python3.mk')
-rw-r--r-- | package/python3/python3.mk | 62 |
1 files changed, 22 insertions, 40 deletions
diff --git a/package/python3/python3.mk b/package/python3/python3.mk index 2773a1203b..ad9b989095 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 |