python3: add 'ensurepip' to python3-pip sub-package 20387/head
authorAlexandru Ardelean <alex@shruggie.ro>
Wed, 25 Jan 2023 12:03:29 +0000 (14:03 +0200)
committerAlexandru Ardelean <alex@shruggie.ro>
Wed, 25 Jan 2023 12:03:33 +0000 (14:03 +0200)
Fixes:
  https://github.com/openwrt/packages/issues/12707

Seems to work.
Looking into the 'venv' lib, it seems it's installing pip & setuptools
inside a virtual environment.

`python3-pip` is already ~6 MB.
This adds another ~3 MB.

But, this gives users the ability to run Python virtual environments, which
is a pretty common feature of Python in production cases (usually web
stuff).

Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
lang/python/python3/Makefile
lang/python/python3/files/python3-package-pip.mk

index 816b1f1dab7f329b9718138d1600acfaf1145503..aa2f2624f031a5276232a65ffa5d96c31dbe2ed0 100644 (file)
@@ -11,7 +11,7 @@ include $(TOPDIR)/rules.mk
 include ../python3-version.mk
 
 PKG_NAME:=python3
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 PKG_VERSION:=$(PYTHON3_VERSION).$(PYTHON3_VERSION_MICRO)
 
 PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
@@ -272,7 +272,6 @@ define Py3Package/python3-light/filespec
 +|/usr/lib/python$(PYTHON3_VERSION)
 -|/usr/lib/python$(PYTHON3_VERSION)/distutils/cygwinccompiler.py
 -|/usr/lib/python$(PYTHON3_VERSION)/distutils/command/wininst*
--|/usr/lib/python$(PYTHON3_VERSION)/ensurepip
 -|/usr/lib/python$(PYTHON3_VERSION)/idlelib
 -|/usr/lib/python$(PYTHON3_VERSION)/tkinter
 -|/usr/lib/python$(PYTHON3_VERSION)/turtledemo
index 8b547cee81f33fbfaf2ecf6cf51b745b66ae23ab..61ea480222b8cdbe78c0812eec30cc8a18b6d4a5 100644 (file)
@@ -29,6 +29,7 @@ define Py3Package/python3-pip/install
 endef
 
 $(eval $(call Py3BasePackage,python3-pip, \
+       /usr/lib/python$(PYTHON3_VERSION)/ensurepip \
        , \
        DO_NOT_ADD_TO_PACKAGE_DEPENDS \
 ))