Browse Source

Merge pull request #3737 from commodo/python3-upgrade

python3: upgrade to version 3.6.0
lilik-openwrt-22.03
Hannu Nyman 8 years ago
committed by GitHub
parent
commit
ccb650f109
3 changed files with 86 additions and 5 deletions
  1. +12
    -3
      lang/python3/Makefile
  2. +2
    -2
      lang/python3/files/python3-version.mk
  3. +72
    -0
      lang/python3/patches/016-adjust-config-paths.patch

+ 12
- 3
lang/python3/Makefile View File

@ -19,7 +19,8 @@ PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO)
PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://www.python.org/ftp/python/$(PKG_VERSION)
PKG_MD5SUM:=8906efbacfcdc7c3c9198aeefafd159e
PKG_MD5SUM:=82b143ebbf4514d7e05876bed7a6b1f5
PKG_HASH:=b0c5f904f685e32d9232f7bdcbece9819a892929063b6e385414ad2dd6a23622
PKG_LICENSE:=PSF
PKG_LICENSE_FILES:=LICENSE Modules/_ctypes/libffi_msvc/LICENSE Modules/_ctypes/darwin/LICENSE Modules/_ctypes/libffi/LICENSE Modules/_ctypes/libffi_osx/LICENSE Tools/pybench/LICENSE
@ -122,14 +123,22 @@ ifeq ($(CONFIG_IPV6),y)
ENABLE_IPV6 += --enable-ipv6
endif
PYTHON_FOR_BUILD:= \
_PYTHON_PROJECT_BASE=$(PKG_BUILD_DIR) \
_PYTHON_HOST_PLATFORM=linux2 \
PYTHONPATH="$(PKG_BUILD_DIR)/Lib:$(PKG_BUILD_DIR)/build/lib.linux2-$(PYTHON_VERSION)" \
_PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata \
$(HOST_PYTHON3_BIN)
CONFIGURE_ARGS+= \
--sysconfdir=/etc \
--enable-shared \
--without-cxx-main \
--with-threads \
--with-system-ffi="$(STAGING_DIR)/usr" \
--with-system-ffi \
--without-pymalloc \
--with-ensurepip=no \
PYTHON_FOR_BUILD="$(PYTHON_FOR_BUILD)" \
$(ENABLE_IPV6) \
CONFIG_SITE="$(PKG_BUILD_DIR)/config.site" \
OPT="$(TARGET_CFLAGS)"
@ -220,7 +229,7 @@ HOST_CONFIGURE_ARGS+= \
--prefix=$(HOST_PYTHON3_DIR) \
--exec-prefix=$(HOST_PYTHON3_DIR) \
--with-system-expat=$(STAGING_DIR_HOSTPKG) \
--with-system-ffi=$(STAGING_DIR_HOSTPKG) \
--with-system-ffi \
--with-ensurepip=no \
CONFIG_SITE= \
CFLAGS="$(HOST_CFLAGS)"


+ 2
- 2
lang/python3/files/python3-version.mk View File

@ -6,8 +6,8 @@
#
PYTHON3_VERSION_MAJOR:=3
PYTHON3_VERSION_MINOR:=5
PYTHON3_VERSION_MICRO:=2
PYTHON3_VERSION_MINOR:=6
PYTHON3_VERSION_MICRO:=0
PYTHON3_VERSION:=$(PYTHON3_VERSION_MAJOR).$(PYTHON3_VERSION_MINOR)

+ 72
- 0
lang/python3/patches/016-adjust-config-paths.patch View File

@ -0,0 +1,72 @@
diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
index 8bf1a70..c2708c3 100644
--- a/Lib/distutils/sysconfig.py
+++ b/Lib/distutils/sysconfig.py
@@ -424,6 +424,7 @@ def _init_posix():
platform=sys.platform,
multiarch=getattr(sys.implementation, '_multiarch', ''),
))
+ name = '_sysconfigdata'
_temp = __import__(name, globals(), locals(), ['build_time_vars'], 0)
build_time_vars = _temp.build_time_vars
global _config_vars
diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
index 9314e71..4861261 100644
--- a/Lib/sysconfig.py
+++ b/Lib/sysconfig.py
@@ -343,6 +343,7 @@ def get_makefile_filename():
def _get_sysconfigdata_name():
+ return '_sysconfigdata'
return os.environ.get('_PYTHON_SYSCONFIGDATA_NAME',
'_sysconfigdata_{abi}_{platform}_{multiarch}'.format(
abi=sys.abiflags,
diff --git a/Makefile.pre.in b/Makefile.pre.in
index cd7d33d..ad6572f 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -1301,7 +1301,7 @@ libinstall: build_all $(srcdir)/Modules/xxmodule.c
esac; \
done; \
done
- $(INSTALL_DATA) `cat pybuilddir.txt`/_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH).py \
+ $(INSTALL_DATA) `cat pybuilddir.txt`/_sysconfigdata*.py \
$(DESTDIR)$(LIBDEST); \
$(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
if test -d $(DESTDIR)$(LIBDEST)/distutils/tests; then \
@@ -1436,7 +1436,7 @@ sharedinstall: sharedmods
--install-scripts=$(BINDIR) \
--install-platlib=$(DESTSHARED) \
--root=$(DESTDIR)/
- -rm $(DESTDIR)$(DESTSHARED)/_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH).py
+ -rm $(DESTDIR)$(DESTSHARED)/_sysconfigdata*.py
-rm -r $(DESTDIR)$(DESTSHARED)/__pycache__
# Here are a couple of targets for MacOSX again, to install a full
diff --git a/configure b/configure
index cf95b27..8203fbb 100755
--- a/configure
+++ b/configure
@@ -14895,7 +14895,7 @@ LDVERSION='$(VERSION)$(ABIFLAGS)'
$as_echo "$LDVERSION" >&6; }
-if test x$PLATFORM_TRIPLET = x; then
+if true ; then
LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
else
LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
diff --git a/configure.ac b/configure.ac
index 1d63813..25f25ed 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4600,7 +4600,7 @@ AC_MSG_RESULT($LDVERSION)
dnl define LIBPL after ABIFLAGS and LDVERSION is defined.
AC_SUBST(PY_ENABLE_SHARED)
-if test x$PLATFORM_TRIPLET = x; then
+if true ; then
LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
else
LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"

Loading…
Cancel
Save