python-pkg-resources
LOW
maintainer Smoolak
0 votes
scanned 2026-09-22 19:39:10.055575
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
3
pkgname=python-pkg-resources
4
pkgver=81.0.0
5
pkgrel=1
6
pkgdesc='Legacy package resource API, separated from Setuptools'
7
arch=('any')
8
url='https://github.com/pypa/setuptools'
9
license=('MIT')
10
depends=('python' 'python-packaging' 'python-jaraco.text' 'python-platformdirs')
11
makedepends=('git' 'python-build' 'python-installer' 'python-setuptools' 'python-wheel')
12
checkdepends=('python-pytest')
13
# Setuptools 82 removed this module. Older releases own the same files.
14
conflicts=('python-setuptools<1:82.0.0')
15
source=(
16
'git+https://github.com/pypa/setuptools.git#commit=049815b259805879f2fd60987f1d9e0d39c9dc96'
17
)
18
sha256sums=('SKIP')
19
20
prepare() {
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]
30
requires = ["setuptools"]
31
build-backend = "setuptools.build_meta"
32
33
[project]
34
name = "pkg-resources"
35
version = "81.0.0"
36
description = "Legacy package resource API from Setuptools"
37
requires-python = ">=3.10"
38
license = "MIT"
39
license-files = ["LICENSE"]
40
dependencies = ["packaging", "jaraco.text", "platformdirs"]
41
42
[tool.setuptools]
43
packages = ["pkg_resources"]
44
45
[tool.setuptools.package-data]
46
pkg_resources = ["py.typed"]
47
EOF
48
}
49
50
build() {
51
cd compat
52
python -m build --wheel --no-isolation
53
}
54
55
check() {
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
67
package() {
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) | Severity | Rules |
|---|---|---|
| 2026-09-22 19:39:10 | Low | 1 |