blob: 99786014f8fa4e1af70bda146dd6061f8b37ee49 (
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
|
# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net>
pkgname=cython-git
pkgver=3.0.12.r813.g7687821df
pkgrel=1
pkgdesc="C-Extensions for Python"
arch=('i686' 'x86_64')
url="https://cython.org/"
license=('Apache-2.0')
depends=('python')
makedepends=('git' 'python-build' 'python-installer' 'python-setuptools' 'python-wheel')
checkdepends=('gdb' 'python-numpy' 'python-pytest' 'python-tests')
provides=("cython=$pkgver")
conflicts=('cython')
source=("git+https://github.com/cython/cython.git")
sha256sums=('SKIP')
pkgver() {
cd "cython"
_tag=$(git tag -l --sort -v:refname | grep -E '^v?[0-9\.]+$' | head -n1)
_rev=$(git rev-list --count $_tag..HEAD)
_hash=$(git rev-parse --short HEAD)
printf "%s.r%s.g%s" "$_tag" "$_rev" "$_hash" | sed 's/^v//'
}
build() {
cd "cython"
python \
-m build \
--wheel \
--no-isolation
}
check() {
cd "cython"
#make \
# test \
# --no-pyregr
}
package() {
cd "cython"
python \
-m installer \
--destdir="$pkgdir" \
dist/*.whl
for f in cygdb cython cythonize; do
mv "$pkgdir/usr/bin/$f" "$pkgdir/usr/bin/${f}3"
ln -s "${f}3" "$pkgdir/usr/bin/$f"
done
}
|