blob: 66f6d135358db94db8bf9aee694c9441569bf6f0 (
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:
_module="iniparse"
_pkgname="python-$_module"
pkgname="$_pkgname-git"
pkgver=0.5.r21.gdbfd717
pkgrel=1
pkgdesc="Better INI parser library for Python"
url="https://github.com/candlepin/python-iniparse"
license=('MIT')
arch=('any')
depends=(
'python'
)
makedepends=(
'git'
'python-build'
'python-installer'
'python-setuptools'
'python-wheel'
)
checkdepends=(
'python-tests'
)
provides=("$_pkgname=${pkgver%%.r*}")
conflicts=("$_pkgname")
_pkgsrc="candlepin.python-iniparse"
source=(
"$_pkgsrc"::"git+$url.git"
"29_fix_tests.patch"::"https://github.com/candlepin/python-iniparse/pull/29.diff"
)
sha256sums=(
'SKIP'
'bbd488275c73583591dcc997993834240e2f45878a1c3ce4972cd82b5b1d925b'
)
prepare() {
cd "$_pkgsrc"
patch -Np1 -i ../29_fix_tests.patch
}
pkgver() {
cd "$_pkgsrc"
git describe --long --tags --abbrev=7 \
| sed -E 's/^[^0-9]*//;s/([^-]*-g)/r\1/;s/-/./g'
}
build() {
cd "$_pkgsrc"
python -m build --no-isolation --wheel
}
check() {
cd "$_pkgsrc"
python runtests.py
}
package() {
cd "$_pkgsrc"
python -m installer --destdir="$pkgdir" "$(ls -1 dist/*.whl | sort -rV | head -1)"
install -Dm644 "LICENSE" -t "$pkgdir/usr/share/licenses/$pkgname/"
rm -rf "$pkgdir/usr/share/doc"
}
|