blob: 7c167a0cb34fe0ec86ab14341f612c957abaaadf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
# Maintainer: Carl Smedstad <carsme@archlinux.org>
pkgname=deptry
pkgver=0.16.1
_commit=caa4e436cca5b15c1e63488f8594050cb21488d0
pkgrel=1
pkgdesc="Find unused, missing and transitive dependencies in a Python project"
arch=(x86_64)
url="https://github.com/fpgmaas/deptry"
license=(MIT)
depends=(
gcc-libs
glibc
python
python-click
)
makedepends=(
git
python-build
python-installer
python-maturin
python-wheel
rustup
)
checkdepends=(
python-pytest
python-pytest-xdist
)
source=("$pkgname::git+$url.git?signed#commit=$_commit")
sha256sums=('a2f3947b2f7214ff236037032983f96bbcf7e26e5811a49740b024c2c9cf2ca5')
validpgpkeys=('968479A1AFF927E37D1A566BB5690EEEBB952194') # GitHub <noreply@github.com>
_archive="$pkgname"
pkgver() {
cd "$_archive"
git describe --tags
}
build() {
cd "$_archive"
python -m build --wheel --no-isolation
}
check() {
cd "$_archive"
rm -rf tmp_install
python -m installer --destdir=tmp_install dist/*.whl
local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
export PYTHONPATH="$PWD/tmp_install/$site_packages"
# Deselected test fails in a clean chroot, not sure why. Functional tests
# ignored as they fail due to what I suspect is some problem with venvs.
pytest tests/ \
--deselect tests/unit/violations/dep003_transitive/test_finder.py::test_simple \
--deselect tests/functional/cli
}
package() {
cd "$_archive"
python -m installer --destdir="$pkgdir" dist/*.whl
install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
}
|