python3-setuptools: add _distutils_hack 16394/head
authorJosef Schlehofer <pepe.schlehofer@gmail.com>
Wed, 18 Aug 2021 10:12:01 +0000 (12:12 +0200)
committerJosef Schlehofer <pepe.schlehofer@gmail.com>
Wed, 18 Aug 2021 10:20:07 +0000 (12:20 +0200)
I tried to install matplotlib by using pip and it failed with the following output:

2021-08-18T11:52:26,171 Collecting matplotlib
2021-08-18T11:52:26,173   Created temporary directory: /tmp/pip-unpack-wuth2u0e
2021-08-18T11:52:26,565   Using cached matplotlib-3.4.3.tar.gz (37.9 MB)
2021-08-18T11:52:38,659   Added matplotlib from https://files.pythonhosted.org/packages/21/37/           197e68df384ff694f78d687a49ad39f96c67b8d75718bc61503e1676b617/matplotlib-3.4.3.tar.                       gz#sha256=fc4f526dfdb31c9bd6b8ca06bf9fab663ca12f3ec9cdf4496fb44bc680140318 to build tracker '/tmp/pip-   req-tracker-u30x8pht'
2021-08-18T11:52:38,660     Running setup.py (path:/tmp/pip-install-afiyiers/                            matplotlib_8e717e38862f4976a3d6cb1832ba3261/setup.py) egg_info for package matplotlib
2021-08-18T11:52:38,661     Created temporary directory: /tmp/pip-pip-egg-info-kbtiezxq
2021-08-18T11:52:38,662     Running command python setup.py egg_info
2021-08-18T11:52:38,831     Traceback (most recent call last):
2021-08-18T11:52:38,832       File "<string>", line 1, in <module>
2021-08-18T11:52:38,832       File "/usr/lib/python3.9/site-packages/setuptools/__init__.py", line 8, in <module>
2021-08-18T11:52:38,833     ModuleNotFoundError: No module named '_distutils_hack'

More details about it:
- https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=968410

Once I applied the patch from the bug tracker, I got further to install
it.

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
lang/python/python3-version.mk
lang/python/python3/files/python3-package-setuptools.mk

index 3054fd4efd0d51eb1c9b61118393a68e20d297bf..fe788c7cce1656a4caa531854f4a1c6e5cff4c55 100644 (file)
@@ -12,7 +12,7 @@ PYTHON3_VERSION_MICRO:=6
 
 PYTHON3_VERSION:=$(PYTHON3_VERSION_MAJOR).$(PYTHON3_VERSION_MINOR)
 
-PYTHON3_SETUPTOOLS_PKG_RELEASE:=1
+PYTHON3_SETUPTOOLS_PKG_RELEASE:=2
 PYTHON3_PIP_PKG_RELEASE:=1
 
 PYTHON3_SETUPTOOLS_VERSION:=56.0.0
index 33cf46a19768ef7637c8dbafee52d9e619109ae1..3b7c1ca57a8303e5d257b1cb8e37320caab0901d 100644 (file)
@@ -20,6 +20,7 @@ define Py3Package/python3-setuptools/install
        $(CP) \
                $(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON3_VERSION)/site-packages/setuptools \
                $(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON3_VERSION)/site-packages/setuptools-$(PYTHON3_SETUPTOOLS_VERSION).dist-info \
+               $(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON3_VERSION)/site-packages/_distutils_hack \
                $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages
        find $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/ -path '*/__pycache__/*' -delete
        find $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages/ -type d -name __pycache__ -delete