From: Tobias Brunner Date: Tue, 28 Mar 2023 09:55:17 +0000 (+0200) Subject: testing: Fix installation of swid-generator with newer versions of setuptools X-Git-Tag: 5.9.11dr1~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6abad65cd728d206570fac5a5658e18a0d72e603;p=thirdparty%2Fstrongswan.git testing: Fix installation of swid-generator with newer versions of setuptools With version 60.0.0 setuptools changed to a local installation of distutils. This seems to break the installation of swid-generator (causing an `importlib.metadata.PackageNotFoundError: swid-generator` error). Note that while Debian ships setuptools 52.0.0, `python-daemon` recently added a dependency on `setuptools>=62.4.0`, which installs that version that's then later used to install swid-generator. The main difference seems to be that the local version installs the package in `/usr/lib/python3.9/site-packages`, while the stdlib version does so in `/usr/local/lib/python3.9/dist-packages` (similarly for the `swid_generator` script and the `distro` dependency). Not sure if there is a better/proper way to fix this. Might just be an issue with Debian bullseye and mixing system packages with those installed via pip3. --- diff --git a/testing/scripts/recipes/014_swid_generator.mk b/testing/scripts/recipes/014_swid_generator.mk index f0e8c3000b..9f8407aa3e 100644 --- a/testing/scripts/recipes/014_swid_generator.mk +++ b/testing/scripts/recipes/014_swid_generator.mk @@ -17,4 +17,4 @@ $(TAR): @touch $@ install: .$(PKG)-unpacked-$(REV) - cd $(DIR) && python3 setup.py install + cd $(DIR) && SETUPTOOLS_USE_DISTUTILS=stdlib python3 setup.py install