blob: ce1ed7ab69a9ad06e0fb3817936931809a5b3ced (
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
|
# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
# Contributor: Oleg Titov <oleg.titov@gmail.com>
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
pkgname=cython
pkgver=0.29.6
pkgrel=0
pkgdesc="Cython is an optimising static compiler for both the Python & the extended Cython programming languages."
url="https://cython.org"
arch="all"
license="Apache-2.0"
options="!check" # several tests fail
makedepends="py2-setuptools py3-setuptools python2-dev python3-dev"
subpackages="cython2:_py2 cython3:_py3 cython-doc"
source="cython-$pkgver.tar.gz::https://github.com/cython/cython/archive/$pkgver.tar.gz"
builddir="$srcdir/cython-$pkgver"
# compatible fix for removing dev subpkg from apkbuild
# cython is not a library but a compiler and does not need a dev subpackage
provides=cython-dev
prepare() {
cp -r "$builddir" "$builddir"-py2
}
build() {
cd "$builddir"
python3 setup.py build
cd "$builddir"-py2
python2 setup.py build
}
check() {
cd "$builddir"
make test
}
package() {
mkdir -p "$pkgdir"
install -Dm 644 LICENSE.txt "$pkgdir/usr/share/licenses/cython/license"
install -Dm 644 README.rst "$pkgdir/usr/share/doc/cython/readme.rst"
}
_py2() {
cd "$builddir"-py2
_py python2
}
_py3() {
cd "$builddir"
_py python3
}
_py() {
_python="$1"
pkgdesc="$pkgdesc (for $_python)"
depends="$depends $_python"
install_if="cython=$pkgver-r$pkgrel $_python"
$_python setup.py install --prefix=/usr --root="$subpkgdir" --optimize=1
}
sha512sums="0fdf2bb7cf269a2251b08639f73ab03a98fbb5b616de18eba810ba6e6eb9a3706f8f265f7389ae34d2a701ca86920779ae533c1c68c9119aec1fbdfeea83ddb0 cython-0.29.6.tar.gz"
|