blob: ffefecc8bd9367c56d76fded5519569a4e092dc0 (
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
69
70
71
72
73
74
75
76
77
|
# Maintainer: Mark Wagie <mark dot wagie at proton dot me>
pkgname=(
'python-jaraco.packaging'
# 'python-jaraco.packaging-docs'
)
pkgbase=python-jaraco.packaging
_name=${pkgbase#python-}
pkgver=10.2.3
pkgrel=1
pkgdesc="Tools to supplement packaging Python releases"
arch=('any')
url="https://github.com/jaraco/jaraco.packaging"
license=('MIT')
depends=(
'python-build'
'python-jaraco.context'
)
makedepends=(
# 'python-domdf-python-tools' ## docs
'python-installer'
# 'python-jaraco.path' ## docs
# 'python-rst.linker' ## docs
'python-setuptools-scm'
# 'python-sphinx-furo' ## docs
# 'python-sphinx-lint' ## docs
'python-wheel'
)
checkdepends=(
'python-docutils'
'python-domdf-python-tools'
'python-pip'
'python-pytest'
'python-sphinx'
)
source=("$_name-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz")
sha256sums=('a12e479e164389aad635dd5373b068d0961eb55c21a1b34d9ed42ecf3b06c20f')
build() {
cd "$_name-$pkgver"
export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
python -m build --wheel --no-isolation
# generate html docs
# PYTHONPATH=./ sphinx-build docs html
# remove the sphinx-build leftovers
# rm -rf html/.{doctrees,buildinfo}
}
check() {
cd "$_name-$pkgver"
PYTHONPATH=./ pytest
}
package_python-jaraco.packaging() {
optdepends=(
'python-docutils: Sphinx plugin'
'python-domdf-python-tools: Sphinx plugin'
# 'python-jaraco.packaging-docs: offline docs'
'python-sphinx: Sphinx plugin'
'python-virtualenv: pypa/build#266'
)
cd "$_name-$pkgver"
python -m installer --destdir="$pkgdir" dist/*.whl
install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
}
package_python-jaraco.packaging-docs() {
pkgdesc+=" (docs)"
depends=()
cd "$_name-$pkgver"
install -d "$pkgdir/usr/share/doc/$pkgname"
cp -r html/* "$pkgdir/usr/share/doc/$pkgname/"
}
|