Trove classifiers, and their officialness, have no effect on a wheel
other than determining whether they are allowed to be uploaded to a
non-Gentoo website, and enabling the search index of that other site.
We don't need this, and we don't need to validate it. Setuptools will
disable validation if both of:
- network downloads failed
- cannot successfully import the `trove_classifiers` module
occurs. If trove-classifiers is installed by coincidence, this breaks
builds when it doesn't get updated on an extremely rapid basis and some
random package in dev-python/* uses a classifier that was made official
just the other day.
We could solve this another way, by making dev-python/setuptools
PDEPEND on trove-classifiers, and constantly bump the >= dependency. But
this is a pointless hassle. In fact, we're actually doing it, and it's
been a pointless hassle. We need to maintain up-to-the-minute minimum
bounds on the very latest version, and bump setuptools to a new -rX just
to update the minimum version of a package it doesn't even depend on. We
need to package new versions of trove-classifiers before *other* Gentoo
Devs outside of the python project, can successfully revbump their own packages. We need to coordinate stabilization of trove-classifiers in combination with those other packages. We force people to install a
pointless package. We overuse PDEPEND.
Instead, apply a *rejected* upstream patch to add an environment
variable that skips this specific validation code block entirely.
Upstream doesn't want to maintain code that contains branches, so we
will maintain it locally.
Since it is Gentoo-specific, the variable is also prefixed with GENTOO_
and is expected to be used solely inside of distribution packaging while
not affecting manual usage of setuptools outside of portage.
Bug:
https://github.com/pypa/setuptools/issues/4459
Signed-off-by: Eli Schwartz <
eschwartz@gentoo.org>
---
v2: patch setuptools instead of adding a trove_classifiers.py shim
...ble-users-to-disable-validating-trov.patch | 65 +++++++++++++++++++
...-r1.ebuild => setuptools-74.1.3-r2.ebuild} | 7 +-
...2.0.ebuild => setuptools-75.2.0-r1.ebuild} | 7 +-
...3.0.ebuild => setuptools-75.3.0-r1.ebuild} | 7 +-
.../setuptools/setuptools-75.4.0.ebuild | 1 +
5 files changed, 69 insertions(+), 18 deletions(-)
create mode 100644 dev-python/setuptools/files/0001-Allow-knowledgeable-users-to-disable-validating-trov.patch
rename dev-python/setuptools/{setuptools-74.1.3-r1.ebuild => setuptools-74.1.3-r2.ebuild} (93%)
rename dev-python/setuptools/{setuptools-75.2.0.ebuild => setuptools-75.2.0-r1.ebuild} (93%)
rename dev-python/setuptools/{setuptools-75.3.0.ebuild => setuptools-75.3.0-r1.ebuild} (93%)
diff --git a/dev-python/setuptools/files/0001-Allow-knowledgeable-users-to-disable-validating-trov.patch b/dev-python/setuptools/files/0001-Allow-knowledgeable-users-to-disable-validating-trov.pa