|
@@ -4,8 +4,8 @@
|
|
#
|
|
#
|
|
################################################################################
|
|
################################################################################
|
|
|
|
|
|
-PYTHON3_VERSION_MAJOR = 3.11
|
|
|
|
-PYTHON3_VERSION = $(PYTHON3_VERSION_MAJOR).8
|
|
|
|
|
|
+PYTHON3_VERSION_MAJOR = 3.12
|
|
|
|
+PYTHON3_VERSION = $(PYTHON3_VERSION_MAJOR).4
|
|
PYTHON3_SOURCE = Python-$(PYTHON3_VERSION).tar.xz
|
|
PYTHON3_SOURCE = Python-$(PYTHON3_VERSION).tar.xz
|
|
PYTHON3_SITE = https://python.org/ftp/python/$(PYTHON3_VERSION)
|
|
PYTHON3_SITE = https://python.org/ftp/python/$(PYTHON3_VERSION)
|
|
PYTHON3_LICENSE = Python-2.0, others
|
|
PYTHON3_LICENSE = Python-2.0, others
|
|
@@ -22,21 +22,25 @@ HOST_PYTHON3_CONF_OPTS += \
|
|
--disable-sqlite3 \
|
|
--disable-sqlite3 \
|
|
--disable-tk \
|
|
--disable-tk \
|
|
--with-expat=system \
|
|
--with-expat=system \
|
|
- --disable-codecs-cjk \
|
|
|
|
- --disable-nis \
|
|
|
|
- --enable-unicodedata \
|
|
|
|
--disable-test-modules \
|
|
--disable-test-modules \
|
|
- --disable-idle3 \
|
|
|
|
- --disable-uuid \
|
|
|
|
- --disable-ossaudiodev
|
|
|
|
|
|
+ --disable-idle3
|
|
|
|
|
|
# Make sure that LD_LIBRARY_PATH overrides -rpath.
|
|
# Make sure that LD_LIBRARY_PATH overrides -rpath.
|
|
# This is needed because libpython may be installed at the same time that
|
|
# This is needed because libpython may be installed at the same time that
|
|
# python is called.
|
|
# python is called.
|
|
-# Make python believe we don't have 'hg', so that it doesn't try to
|
|
|
|
-# communicate over the network during the build.
|
|
|
|
|
|
+# TODO: nis and ossaudiodev modules will be dropped in 3.13: https://peps.python.org/pep-0594/
|
|
HOST_PYTHON3_CONF_ENV += \
|
|
HOST_PYTHON3_CONF_ENV += \
|
|
- LDFLAGS="$(HOST_LDFLAGS) -Wl,--enable-new-dtags"
|
|
|
|
|
|
+ LDFLAGS="$(HOST_LDFLAGS) -Wl,--enable-new-dtags" \
|
|
|
|
+ py_cv_module_unicodedata=yes \
|
|
|
|
+ py_cv_module__codecs_cn=n/a \
|
|
|
|
+ py_cv_module__codecs_hk=n/a \
|
|
|
|
+ py_cv_module__codecs_iso2022=n/a \
|
|
|
|
+ py_cv_module__codecs_jp=n/a \
|
|
|
|
+ py_cv_module__codecs_kr=n/a \
|
|
|
|
+ py_cv_module__codecs_tw=n/a \
|
|
|
|
+ py_cv_module__uuid=n/a \
|
|
|
|
+ py_cv_module_nis=n/a \
|
|
|
|
+ py_cv_module_ossaudiodev=n/a
|
|
|
|
|
|
PYTHON3_DEPENDENCIES = host-python3 libffi
|
|
PYTHON3_DEPENDENCIES = host-python3 libffi
|
|
|
|
|
|
@@ -50,7 +54,7 @@ HOST_PYTHON3_DEPENDENCIES = \
|
|
ifeq ($(BR2_PACKAGE_HOST_PYTHON3_BZIP2),y)
|
|
ifeq ($(BR2_PACKAGE_HOST_PYTHON3_BZIP2),y)
|
|
HOST_PYTHON3_DEPENDENCIES += host-bzip2
|
|
HOST_PYTHON3_DEPENDENCIES += host-bzip2
|
|
else
|
|
else
|
|
-HOST_PYTHON3_CONF_OPTS += --disable-bzip2
|
|
|
|
|
|
+HOST_PYTHON3_CONF_ENV += py_cv_module__bz2=n/a
|
|
endif
|
|
endif
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_HOST_PYTHON3_CURSES),y)
|
|
ifeq ($(BR2_PACKAGE_HOST_PYTHON3_CURSES),y)
|
|
@@ -62,7 +66,9 @@ endif
|
|
ifeq ($(BR2_PACKAGE_HOST_PYTHON3_SSL),y)
|
|
ifeq ($(BR2_PACKAGE_HOST_PYTHON3_SSL),y)
|
|
HOST_PYTHON3_DEPENDENCIES += host-openssl
|
|
HOST_PYTHON3_DEPENDENCIES += host-openssl
|
|
else
|
|
else
|
|
-HOST_PYTHON3_CONF_OPTS += --disable-openssl
|
|
|
|
|
|
+HOST_PYTHON3_CONF_ENV += \
|
|
|
|
+ py_cv_module__hashlib=n/a \
|
|
|
|
+ py_cv_module__ssl=n/a
|
|
endif
|
|
endif
|
|
|
|
|
|
PYTHON3_INSTALL_STAGING = YES
|
|
PYTHON3_INSTALL_STAGING = YES
|
|
@@ -76,13 +82,14 @@ endif
|
|
ifeq ($(BR2_PACKAGE_PYTHON3_BERKELEYDB),y)
|
|
ifeq ($(BR2_PACKAGE_PYTHON3_BERKELEYDB),y)
|
|
PYTHON3_DEPENDENCIES += berkeleydb
|
|
PYTHON3_DEPENDENCIES += berkeleydb
|
|
else
|
|
else
|
|
-PYTHON3_CONF_OPTS += --disable-berkeleydb
|
|
|
|
|
|
+PYTHON3_CONF_ENV += py_cv_module__dbm=n/a
|
|
endif
|
|
endif
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_PYTHON3_READLINE),y)
|
|
ifeq ($(BR2_PACKAGE_PYTHON3_READLINE),y)
|
|
|
|
+PYTHON3_CONF_OPTS += --with-readline
|
|
PYTHON3_DEPENDENCIES += readline
|
|
PYTHON3_DEPENDENCIES += readline
|
|
else
|
|
else
|
|
-PYTHON3_CONF_OPTS += --disable-readline
|
|
|
|
|
|
+PYTHON3_CONF_OPTS += --without-readline
|
|
endif
|
|
endif
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_PYTHON3_CURSES),y)
|
|
ifeq ($(BR2_PACKAGE_PYTHON3_CURSES),y)
|
|
@@ -93,9 +100,9 @@ endif
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_PYTHON3_DECIMAL),y)
|
|
ifeq ($(BR2_PACKAGE_PYTHON3_DECIMAL),y)
|
|
PYTHON3_DEPENDENCIES += mpdecimal
|
|
PYTHON3_DEPENDENCIES += mpdecimal
|
|
-PYTHON3_CONF_OPTS += --with-libmpdec=system
|
|
|
|
|
|
+PYTHON3_CONF_OPTS += --with-system-libmpdec
|
|
else
|
|
else
|
|
-PYTHON3_CONF_OPTS += --with-libmpdec=none
|
|
|
|
|
|
+PYTHON3_CONF_ENV += py_cv_module__decimal=n/a
|
|
endif
|
|
endif
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_PYTHON3_PYEXPAT),y)
|
|
ifeq ($(BR2_PACKAGE_PYTHON3_PYEXPAT),y)
|
|
@@ -115,51 +122,58 @@ ifeq ($(BR2_PACKAGE_PYTHON3_SSL),y)
|
|
PYTHON3_DEPENDENCIES += openssl
|
|
PYTHON3_DEPENDENCIES += openssl
|
|
PYTHON3_CONF_OPTS += --with-openssl=$(STAGING_DIR)/usr
|
|
PYTHON3_CONF_OPTS += --with-openssl=$(STAGING_DIR)/usr
|
|
else
|
|
else
|
|
-PYTHON3_CONF_OPTS += --disable-openssl
|
|
|
|
|
|
+PYTHON3_CONF_ENV += \
|
|
|
|
+ py_cv_module__hashlib=n/a \
|
|
|
|
+ py_cv_module__ssl=n/a
|
|
endif
|
|
endif
|
|
|
|
|
|
ifneq ($(BR2_PACKAGE_PYTHON3_CODECSCJK),y)
|
|
ifneq ($(BR2_PACKAGE_PYTHON3_CODECSCJK),y)
|
|
-PYTHON3_CONF_OPTS += --disable-codecs-cjk
|
|
|
|
|
|
+PYTHON3_CONF_ENV += \
|
|
|
|
+ py_cv_module__codecs_cn=n/a \
|
|
|
|
+ py_cv_module__codecs_hk=n/a \
|
|
|
|
+ py_cv_module__codecs_iso2022=n/a \
|
|
|
|
+ py_cv_module__codecs_jp=n/a \
|
|
|
|
+ py_cv_module__codecs_kr=n/a \
|
|
|
|
+ py_cv_module__codecs_tw=n/a
|
|
endif
|
|
endif
|
|
|
|
|
|
ifneq ($(BR2_PACKAGE_PYTHON3_UNICODEDATA),y)
|
|
ifneq ($(BR2_PACKAGE_PYTHON3_UNICODEDATA),y)
|
|
-PYTHON3_CONF_OPTS += --disable-unicodedata
|
|
|
|
|
|
+PYTHON3_CONF_ENV += py_cv_module_unicodedata=n/a
|
|
endif
|
|
endif
|
|
|
|
|
|
# Disable auto-detection of uuid.h (util-linux)
|
|
# Disable auto-detection of uuid.h (util-linux)
|
|
# which would add _uuid module support, instead
|
|
# which would add _uuid module support, instead
|
|
# default to the pure python implementation
|
|
# default to the pure python implementation
|
|
-PYTHON3_CONF_OPTS += --disable-uuid
|
|
|
|
|
|
+PYTHON3_CONF_ENV += py_cv_module__uuid=n/a
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_PYTHON3_BZIP2),y)
|
|
ifeq ($(BR2_PACKAGE_PYTHON3_BZIP2),y)
|
|
PYTHON3_DEPENDENCIES += bzip2
|
|
PYTHON3_DEPENDENCIES += bzip2
|
|
else
|
|
else
|
|
-PYTHON3_CONF_OPTS += --disable-bzip2
|
|
|
|
|
|
+PYTHON3_CONF_ENV += py_cv_module__bz2=n/a
|
|
endif
|
|
endif
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_PYTHON3_XZ),y)
|
|
ifeq ($(BR2_PACKAGE_PYTHON3_XZ),y)
|
|
PYTHON3_DEPENDENCIES += xz
|
|
PYTHON3_DEPENDENCIES += xz
|
|
else
|
|
else
|
|
-PYTHON3_CONF_OPTS += --disable-xz
|
|
|
|
|
|
+PYTHON3_CONF_ENV += py_cv_module__lzma=n/a
|
|
endif
|
|
endif
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_PYTHON3_ZLIB),y)
|
|
ifeq ($(BR2_PACKAGE_PYTHON3_ZLIB),y)
|
|
PYTHON3_DEPENDENCIES += zlib
|
|
PYTHON3_DEPENDENCIES += zlib
|
|
else
|
|
else
|
|
-PYTHON3_CONF_OPTS += --disable-zlib
|
|
|
|
|
|
+PYTHON3_CONF_ENV += py_cv_module_zlib=n/a
|
|
endif
|
|
endif
|
|
|
|
|
|
-ifeq ($(BR2_PACKAGE_PYTHON3_OSSAUDIODEV),y)
|
|
|
|
-PYTHON3_CONF_OPTS += --enable-ossaudiodev
|
|
|
|
-else
|
|
|
|
-PYTHON3_CONF_OPTS += --disable-ossaudiodev
|
|
|
|
|
|
+ifneq ($(BR2_PACKAGE_PYTHON3_OSSAUDIODEV),y)
|
|
|
|
+PYTHON3_CONF_ENV += py_cv_module_ossaudiodev=n/a
|
|
endif
|
|
endif
|
|
|
|
|
|
PYTHON3_CONF_ENV += \
|
|
PYTHON3_CONF_ENV += \
|
|
ac_cv_have_long_long_format=yes \
|
|
ac_cv_have_long_long_format=yes \
|
|
ac_cv_file__dev_ptmx=yes \
|
|
ac_cv_file__dev_ptmx=yes \
|
|
ac_cv_file__dev_ptc=yes \
|
|
ac_cv_file__dev_ptc=yes \
|
|
- ac_cv_working_tzset=yes
|
|
|
|
|
|
+ ac_cv_working_tzset=yes \
|
|
|
|
+ py_cv_module_nis=n/a
|
|
|
|
|
|
# GCC is always compliant with IEEE754
|
|
# GCC is always compliant with IEEE754
|
|
ifeq ($(BR2_ENDIAN),"LITTLE")
|
|
ifeq ($(BR2_ENDIAN),"LITTLE")
|
|
@@ -168,12 +182,6 @@ else
|
|
PYTHON3_CONF_ENV += ac_cv_big_endian_double=yes
|
|
PYTHON3_CONF_ENV += ac_cv_big_endian_double=yes
|
|
endif
|
|
endif
|
|
|
|
|
|
-# uClibc is known to have a broken wcsftime() implementation, so tell
|
|
|
|
-# Python 3 to fall back to strftime() instead.
|
|
|
|
-ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
|
|
|
|
-PYTHON3_CONF_ENV += ac_cv_func_wcsftime=no
|
|
|
|
-endif
|
|
|
|
-
|
|
|
|
ifeq ($(BR2_PACKAGE_GETTEXT_PROVIDES_LIBINTL),y)
|
|
ifeq ($(BR2_PACKAGE_GETTEXT_PROVIDES_LIBINTL),y)
|
|
PYTHON3_DEPENDENCIES += gettext
|
|
PYTHON3_DEPENDENCIES += gettext
|
|
endif
|
|
endif
|
|
@@ -186,7 +194,6 @@ PYTHON3_CONF_OPTS += \
|
|
--disable-pydoc \
|
|
--disable-pydoc \
|
|
--disable-test-modules \
|
|
--disable-test-modules \
|
|
--disable-tk \
|
|
--disable-tk \
|
|
- --disable-nis \
|
|
|
|
--disable-idle3 \
|
|
--disable-idle3 \
|
|
--disable-pyc-build
|
|
--disable-pyc-build
|
|
|
|
|