blob: 086b54ed3055b491a1cc7bd1aa5d795e5921f530 (
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
|
# Maintainer: KokaKiwi <kokakiwi+aur@kokakiwi.net>
pkgbase=python-pyrage
pkgname=(python-pyrage python-pyrage-stubs)
pkgver=1.3.0
pkgrel=1
pkgdesc="Python bindings for rage (age in Rust)"
arch=('x86_64')
url="https://pypi.org/project/pyrage"
license=('MIT')
depends=('python')
makedepends=('python-build' 'python-installer' 'python-wheel' 'python-setuptools' 'maturin')
checkdepends=('python-parameterized')
source=("$pkgname-$pkgver.tar.gz::https://github.com/woodruffw/pyrage/archive/refs/tags/v$pkgver.tar.gz")
sha256sums=('88ecee44f85f213b44f5f7f797324b8e6245c6a4dbec62816accafcfc3a57fc0')
b2sums=('3b2af814fc8ebd06b0a629dab1d23f25baf50f50db186f346a8b12a2d6ef4df694a52f6eac10a7bd2abc2d6b34b9db43e1e99988da37ce955db1f930c98c5116')
prepare() {
cd "pyrage-$pkgver"
cargo fetch
}
build() {
cd "pyrage-$pkgver"
maturin build --release --strip --frozen
python -m build --wheel --no-isolation pyrage-stubs
}
check() {
cd "pyrage-$pkgver"
rm -rf "$srcdir/_test"
python -m installer --destdir="$srcdir/_test" target/wheels/*.whl
PYTHONPATH="$srcdir/_test"$(python -c 'import site; print(site.getsitepackages()[0])') \
python -m unittest
}
package_python-pyrage() {
cd "pyrage-$pkgver"
python -m installer --destdir="$pkgdir" target/wheels/*.whl
install -Dm0644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
package_python-pyrage-stubs() {
arch=('any')
cd "pyrage-$pkgver"
python -m installer --destdir="$pkgdir" pyrage-stubs/dist/*.whl
install -Dm0644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
export RUSTUP_TOOLCHAIN=${RUSTUP_TOOLCHAIN:-stable}
|