mirror of
https://github.com/openwrt/packages.git
synced 2025-12-23 21:04:33 +04:00
python,python3: split python[3]-pkg-resources from setuptools
This package is required by other packages to run some binaries via `load_entry_point`. So, this splits this package away from setuptools. setuptools is pretty big, akd pkg-resources is also big, but not as big. Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
This commit is contained in:
@@ -12,7 +12,7 @@ include ../python-version.mk
|
||||
|
||||
PKG_NAME:=python
|
||||
PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO)
|
||||
PKG_RELEASE:=9
|
||||
PKG_RELEASE:=10
|
||||
|
||||
PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=https://www.python.org/ftp/python/$(PKG_VERSION)
|
||||
@@ -39,6 +39,7 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/Python-$(PKG_VERSION)
|
||||
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/Python-$(PKG_VERSION)
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
CONFIG_PACKAGE_python-pkg-resources \
|
||||
CONFIG_PACKAGE_python-setuptools CONFIG_PACKAGE_python-pip \
|
||||
CONFIG_PYTHON_BLUETOOTH_SUPPORT
|
||||
|
||||
@@ -169,6 +170,14 @@ define Build/Prepare
|
||||
endef
|
||||
|
||||
ifdef CONFIG_PACKAGE_python-setuptools
|
||||
PYTHON_SETUPTOOLS_BUILD:=1
|
||||
endif
|
||||
|
||||
ifdef CONFIG_PACKAGE_python-pkg-resources
|
||||
PYTHON_SETUPTOOLS_BUILD:=1
|
||||
endif
|
||||
|
||||
ifeq ($(PYTHON_SETUPTOOLS_BUILD),1)
|
||||
define Build/Compile/python-setuptools
|
||||
$(HOST_PYTHON_PIP) \
|
||||
--disable-pip-version-check \
|
||||
|
||||
28
lang/python/python/files/python-package-pkg-resources.mk
Normal file
28
lang/python/python/files/python-package-pkg-resources.mk
Normal file
@@ -0,0 +1,28 @@
|
||||
#
|
||||
# Copyright (C) 2019 Alexandru Ardelean <ardeleanalex@gmail.com>
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
define Package/python-pkg-resources
|
||||
$(call Package/python/Default)
|
||||
TITLE:=Python $(PYTHON_VERSION) pkg_resources module (part of etuptools)
|
||||
VERSION:=$(PYTHON_SETUPTOOLS_VERSION)-$(PYTHON_SETUPTOOLS_PKG_RELEASE)
|
||||
LICENSE:=MIT
|
||||
LICENSE_FILES:=LICENSE
|
||||
# CPE_ID:=cpe:/a:python:setuptools # not currently handled this way by uscan
|
||||
DEPENDS:=+python
|
||||
endef
|
||||
|
||||
define PyPackage/python-pkg-resources/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib/python$(PYTHON_VERSION)/site-packages
|
||||
$(CP) \
|
||||
$(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON_VERSION)/site-packages/pkg_resources \
|
||||
$(1)/usr/lib/python$(PYTHON_VERSION)/site-packages
|
||||
endef
|
||||
|
||||
$(eval $(call PyBasePackage,python-pkg-resources, \
|
||||
, \
|
||||
DO_NOT_ADD_TO_PACKAGE_DEPENDS \
|
||||
))
|
||||
@@ -12,14 +12,13 @@ $(call Package/python/Default)
|
||||
LICENSE:=MIT
|
||||
LICENSE_FILES:=LICENSE
|
||||
# CPE_ID:=cpe:/a:python:setuptools # not currently handled this way by uscan
|
||||
DEPENDS:=+python
|
||||
DEPENDS:=+python +python-pkg-resources
|
||||
endef
|
||||
|
||||
define PyPackage/python-setuptools/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/python$(PYTHON_VERSION)/site-packages
|
||||
$(CP) $(PKG_BUILD_DIR)/install-setuptools/usr/bin/* $(1)/usr/bin
|
||||
$(CP) \
|
||||
$(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON_VERSION)/site-packages/pkg_resources \
|
||||
$(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON_VERSION)/site-packages/setuptools \
|
||||
$(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON_VERSION)/site-packages/setuptools-$(PYTHON_SETUPTOOLS_VERSION).dist-info \
|
||||
$(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON_VERSION)/site-packages/easy_install.py \
|
||||
|
||||
Reference in New Issue
Block a user