summaryrefslogtreecommitdiffstats
path: root/package/python3/python3.mk
diff options
context:
space:
mode:
Diffstat (limited to 'package/python3/python3.mk')
-rw-r--r--package/python3/python3.mk62
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
OpenPOWER on IntegriCloud