Merge pull request #3754 from commodo/python-upgrade
python: upgrade to version 2.7.13 (and do some cleanups)
This commit is contained in:
commit
3bf2135e27
5 changed files with 50 additions and 22 deletions
|
@ -12,11 +12,12 @@ include ./files/python-version.mk
|
||||||
|
|
||||||
PKG_NAME:=python
|
PKG_NAME:=python
|
||||||
PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO)
|
PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO)
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
|
PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
|
||||||
PKG_SOURCE_URL:=https://www.python.org/ftp/python/$(PKG_VERSION)
|
PKG_SOURCE_URL:=https://www.python.org/ftp/python/$(PKG_VERSION)
|
||||||
PKG_MD5SUM:=57dffcee9cee8bb2ab5f82af1d8e9a69
|
PKG_MD5SUM:=53b43534153bb2a0363f08bae8b9d990
|
||||||
|
PKG_HASH:=35d543986882f78261f97787fd3e06274bfa6df29fac9b4a94f73930ff98f731
|
||||||
|
|
||||||
PKG_LICENSE:=PSF
|
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
|
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,13 +123,21 @@ ifeq ($(CONFIG_IPV6),y)
|
||||||
ENABLE_IPV6 += --enable-ipv6
|
ENABLE_IPV6 += --enable-ipv6
|
||||||
endif
|
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_PYTHON_BIN)
|
||||||
|
|
||||||
CONFIGURE_ARGS+= \
|
CONFIGURE_ARGS+= \
|
||||||
--sysconfdir=/etc \
|
--sysconfdir=/etc \
|
||||||
--enable-shared \
|
--enable-shared \
|
||||||
--without-cxx-main \
|
--without-cxx-main \
|
||||||
--with-threads \
|
--with-threads \
|
||||||
--with-system-ffi="$(STAGING_DIR)/usr" \
|
--with-system-ffi \
|
||||||
--without-pymalloc \
|
--without-pymalloc \
|
||||||
|
PYTHON_FOR_BUILD="$(PYTHON_FOR_BUILD)" \
|
||||||
$(ENABLE_IPV6) \
|
$(ENABLE_IPV6) \
|
||||||
CONFIG_SITE="$(PKG_BUILD_DIR)/config.site" \
|
CONFIG_SITE="$(PKG_BUILD_DIR)/config.site" \
|
||||||
OPT="$(TARGET_CFLAGS)"
|
OPT="$(TARGET_CFLAGS)"
|
||||||
|
@ -227,7 +236,7 @@ HOST_CONFIGURE_ARGS+= \
|
||||||
--prefix=$(HOST_PYTHON_DIR) \
|
--prefix=$(HOST_PYTHON_DIR) \
|
||||||
--exec-prefix=$(HOST_PYTHON_DIR) \
|
--exec-prefix=$(HOST_PYTHON_DIR) \
|
||||||
--with-system-expat=$(STAGING_DIR_HOSTPKG) \
|
--with-system-expat=$(STAGING_DIR_HOSTPKG) \
|
||||||
--with-system-ffi=$(STAGING_DIR_HOSTPKG) \
|
--with-system-ffi \
|
||||||
CONFIG_SITE= \
|
CONFIG_SITE= \
|
||||||
CFLAGS="$(HOST_CFLAGS)"
|
CFLAGS="$(HOST_CFLAGS)"
|
||||||
|
|
||||||
|
|
|
@ -77,4 +77,20 @@ define Build/Compile/HostPyMod
|
||||||
$(3))
|
$(3))
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define HostPy/Compile/Default
|
||||||
|
$(call Build/Compile/HostPyMod,,\
|
||||||
|
install --root="$(HOST_BUILD_PREFIX)" --prefix="" \
|
||||||
|
--single-version-externally-managed \
|
||||||
|
)
|
||||||
|
endef
|
||||||
|
|
||||||
|
ifeq ($(BUILD_VARIANT),python)
|
||||||
|
define Host/Compile
|
||||||
|
$(call HostPy/Compile/Default)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Host/Install
|
||||||
|
endef
|
||||||
|
endif # python
|
||||||
|
|
||||||
endif # __python_host_mk_inc
|
endif # __python_host_mk_inc
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
define Package/python-dev
|
define Package/python-dev
|
||||||
$(call Package/python/Default)
|
$(call Package/python/Default)
|
||||||
TITLE:=Python $(PYTHON_VERSION) development files
|
TITLE:=Python $(PYTHON_VERSION) development files
|
||||||
DEPENDS:=+python
|
DEPENDS:=+python +python-lib2to3
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define PyPackage/python-dev/install
|
define PyPackage/python-dev/install
|
||||||
|
|
|
@ -41,6 +41,15 @@ define PyPackage
|
||||||
endef
|
endef
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifndef PyPackage/$(1)/install
|
||||||
|
define PyPackage/$(1)/install
|
||||||
|
if [ -d $(PKG_INSTALL_DIR)/usr/bin ]; then \
|
||||||
|
$(INSTALL_DIR) $$(1)/usr/bin \
|
||||||
|
$(CP) $(PKG_INSTALL_DIR)/usr/bin/* $$(1)/usr/bin/
|
||||||
|
fi
|
||||||
|
endef
|
||||||
|
endif
|
||||||
|
|
||||||
$(call shexport,PyPackage/$(1)/filespec)
|
$(call shexport,PyPackage/$(1)/filespec)
|
||||||
|
|
||||||
define Package/$(1)/install
|
define Package/$(1)/install
|
||||||
|
@ -115,21 +124,15 @@ define Build/Compile/PyMod
|
||||||
find $(PKG_INSTALL_DIR) -name "*\.pyc" -o -name "*\.pyo" -o -name "*\.exe" | xargs rm -f
|
find $(PKG_INSTALL_DIR) -name "*\.pyc" -o -name "*\.pyo" -o -name "*\.exe" | xargs rm -f
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define PyMod/Default
|
define PyBuild/Compile/Default
|
||||||
define Build/Compile
|
$(call Build/Compile/PyMod,, \
|
||||||
$$(call Build/Compile/PyMod,,install --prefix=/usr --root=$(PKG_INSTALL_DIR))
|
install --prefix="/usr" --root="$(PKG_INSTALL_DIR)" \
|
||||||
endef
|
--single-version-externally-managed \
|
||||||
|
)
|
||||||
define Package/$(PKG_NAME)/install
|
|
||||||
$(INSTALL_DIR) $$(1)$(PYTHON_PKG_DIR) $$(1)/usr/bin
|
|
||||||
if [ -d $(PKG_INSTALL_DIR)/usr/bin ]; then find $(PKG_INSTALL_DIR)/usr/bin -mindepth 1 -maxdepth 1 -type f -exec $(CP) \{\} $$(1)/usr/bin/ \; ; fi
|
|
||||||
find $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR) -mindepth 1 -maxdepth 1 \( -type f -o -type d \) -exec $(CP) \{\} $$(1)$(PYTHON_PKG_DIR)/ \;
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Build/InstallDev
|
|
||||||
$(INSTALL_DIR) $$(1)/usr/bin $$(1)$(PYTHON_PKG_DIR)
|
|
||||||
if [ -d $(PKG_INSTALL_DIR)/usr/bin ]; then find $(PKG_INSTALL_DIR)/usr/bin -mindepth 1 -maxdepth 1 -type f -exec $(CP) \{\} $$(1)/usr/bin/ \; ; fi
|
|
||||||
find $(PKG_INSTALL_DIR)$(PYTHON_PKG_DIR) -mindepth 1 -maxdepth 1 \( -type f -o -type d \) -exec $(CP) \{\} $$(1)$(PYTHON_PKG_DIR)/ \;
|
|
||||||
endef
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
ifeq ($(BUILD_VARIANT),python)
|
||||||
|
define Build/Compile
|
||||||
|
$(call PyBuild/Compile/Default)
|
||||||
|
endef
|
||||||
|
endif # python
|
||||||
|
|
|
@ -6,5 +6,5 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
PYTHON_VERSION:=2.7
|
PYTHON_VERSION:=2.7
|
||||||
PYTHON_VERSION_MICRO:=12
|
PYTHON_VERSION_MICRO:=13
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue