python-pkg-resources

LOW
maintainer Smoolak 0 votes scanned 2026-09-22 19:39:10.055575
View on AUR
Why flagged

Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.

Triggered rules

Low Few votes, recently uploaded zero_votes_recent

Uploaded within the last 14 days with 2 or fewer community votes — little peer review so far.

PKGBUILD

1# Maintainer: Smoolak <smoolak@gmail.com>
2
3pkgname=python-pkg-resources
4pkgver=81.0.0
5pkgrel=1
6pkgdesc='Legacy package resource API, separated from Setuptools'
7arch=('any')
8url='https://github.com/pypa/setuptools'
9license=('MIT')
10depends=('python' 'python-packaging' 'python-jaraco.text' 'python-platformdirs')
11makedepends=('git' 'python-build' 'python-installer' 'python-setuptools' 'python-wheel')
12checkdepends=('python-pytest')
13# Setuptools 82 removed this module. Older releases own the same files.
14conflicts=('python-setuptools<1:82.0.0')
15source=(
16 'git+https://github.com/pypa/setuptools.git#commit=049815b259805879f2fd60987f1d9e0d39c9dc96'
17)
18sha256sums=('SKIP')
19
20prepare() {
21 # 81.0.0 is the last upstream release carrying pkg_resources. Package only
22 # that API, not an old setuptools backend or its vendored dependencies.
23 mkdir -p compat/pkg_resources checks
24 cp setuptools/pkg_resources/{__init__.py,py.typed} compat/pkg_resources/
25 cp setuptools/LICENSE compat/
26 sed -i '/^sys.path.extend.*vendor_path/d' compat/pkg_resources/__init__.py
27 cp setuptools/pkg_resources/tests/{__init__.py,test_markers.py,test_resources.py,test_working_set.py} checks/
28 cat > compat/pyproject.toml <<'EOF'
29[build-system]
30requires = ["setuptools"]
31build-backend = "setuptools.build_meta"
32
33[project]
34name = "pkg-resources"
35version = "81.0.0"
36description = "Legacy package resource API from Setuptools"
37requires-python = ">=3.10"
38license = "MIT"
39license-files = ["LICENSE"]
40dependencies = ["packaging", "jaraco.text", "platformdirs"]
41
42[tool.setuptools]
43packages = ["pkg_resources"]
44
45[tool.setuptools.package-data]
46pkg_resources = ["py.typed"]
47EOF
48}
49
50build() {
51 cd compat
52 python -m build --wheel --no-isolation
53}
54
55check() {
56 local site
57 site=$(python -c 'import site; print(site.getsitepackages()[0])')
58 python -m installer --destdir="$srcdir/check-install" compat/dist/*.whl
59 # Entry-point tests address themselves as pkg_resources.tests.*. Keep their
60 # upstream module identity inside the disposable test prefix, not the wheel.
61 cp -a checks "$srcdir/check-install$site/pkg_resources/tests"
62 PYTHONPATH="$srcdir/check-install$site" PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
63 python -m pytest -c /dev/null -o cache_dir="$srcdir/pytest-cache" \
64 --import-mode=importlib -ra "$srcdir/check-install$site/pkg_resources/tests"
65}
66
67package() {
68 python -m installer --destdir="$pkgdir" compat/dist/*.whl
69 install -Dm644 compat/LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
70}
71

Scan history

Scanned at (UTC)SeverityRules
2026-09-22 19:39:10 Low 1

Report a package

Reports go to the AURWatch maintainer (one person) and are read by hand. No login required.

0 / 4000
Your suggestion