blob: c9fb79d5d72e148a653b4e80850c25f030b4a37f (
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
|
# Maintainer: Claudia Pellegrino <aur ät cpellegrino.de>
pkgname=python-qualify
_gitpkgname=qualify
pkgver=0.1.1
pkgrel=3
# shellcheck disable=SC2016 # Not meant to be expanded
pkgdesc='Import top-level modules from a directory not on `sys.path`'
arch=('any')
url='https://github.com/claui/qualify'
license=('Apache-2.0')
depends=(
'python'
'python-colorama'
'python-wrapt'
)
makedepends=(
'python-build'
'python-installer'
'python-myst-parser'
'python-poetry-core'
'python-sphinx'
'python-wheel'
)
checkdepends=('python-pytest')
options=('!debug' '!strip')
source=("${_gitpkgname}-${pkgver}.tar.gz::https://github.com/claui/qualify/archive/v${pkgver}.tar.gz")
sha512sums=('ed7acebcda0c0e144b16b653dc99fdc259353081a52b5fb5846fbc2fb1f1eb9e506e267dd207c6059fc52b442d5b488cb4eea8d7a8118fe61eb5875da20db197')
build() {
cd "${srcdir}/${_gitpkgname}-${pkgver}"
echo >&2 'Building wheel'
python -m build --wheel --no-isolation
echo >&2 'Generating man page'
sphinx-build -aqEW -b man doc/sphinx build/man
}
check() {
cd "${srcdir}/${_gitpkgname}-${pkgver}"
python -m pytest
}
package() {
cd "${srcdir}/${_gitpkgname}-${pkgver}"
echo >&2 'Packaging the wheel'
python -I -m installer --destdir="${pkgdir}" dist/*.whl
echo >&2 'Packaging README.md'
install -D -m 644 -t "${pkgdir}/usr/share/doc/${pkgname}" \
'README.md'
echo >&2 'Packaging the license'
install -D -m 644 -t "${pkgdir}/usr/share/licenses/${pkgname}" \
'LICENSE'
echo >&2 'Packaging the man page'
install -D -m 644 -t "${pkgdir}/usr/share/man/man3" \
build/man/*.3
}
|