aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleg Titov <oleg.titov@gmail.com>2019-02-06 16:01:02 -0600
committerCarlo Landmeter <clandmeter@alpinelinux.org>2019-04-10 15:52:53 +0000
commitf62448510f0d0346e538385f12140c2374a4a5f6 (patch)
treebc7e559414fe9fe22a70214621efb2ac972f8cf7
parent31374d9cade928fafa2c2f3571d727e21a7f1b61 (diff)
downloadaports-f62448510f0d0346e538385f12140c2374a4a5f6.tar.bz2
aports-f62448510f0d0346e538385f12140c2374a4a5f6.tar.xz
main/cython: upgrade to 0.29.6, add support for python2 and python3 packages, removed dev subpackage, move to community
Upgrade to 0.29.6. Add support for python2 and python3 packages. Removed dev subpackage. Move to community.
-rw-r--r--community/cython/APKBUILD65
-rw-r--r--main/cython/APKBUILD28
2 files changed, 65 insertions, 28 deletions
diff --git a/community/cython/APKBUILD b/community/cython/APKBUILD
new file mode 100644
index 0000000000..ce1ed7ab69
--- /dev/null
+++ b/community/cython/APKBUILD
@@ -0,0 +1,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"
diff --git a/main/cython/APKBUILD b/main/cython/APKBUILD
deleted file mode 100644
index f606d38d9e..0000000000
--- a/main/cython/APKBUILD
+++ /dev/null
@@ -1,28 +0,0 @@
-# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
-# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
-pkgname=cython
-pkgver=0.29.2
-pkgrel=0
-pkgdesc="Cython is an optimising static compiler for both the Python & the extended Cython programming languages."
-url="http://cython.org"
-arch="all"
-license="Apache-2.0"
-depends=""
-depends_dev="python2-dev py-pgen cython"
-makedepends="$depends_dev"
-subpackages="$pkgname-dev"
-source="$pkgname-$pkgver.tar.gz::https://github.com/cython/cython/archive/$pkgver.tar.gz"
-builddir="$srcdir/$pkgname-$pkgver"
-
-build() {
- cd "$builddir"
- python2 setup.py build
-}
-
-package() {
- cd "$builddir"
- python2 setup.py install --prefix=/usr \
- --root="$pkgdir" --optimize=1
-}
-
-sha512sums="941b1ad7b83622ccf8e2d544b24b13908afe447313504a4178800ef23757a3c5cbb10a13013d4733c8efb0eb7a5ea6f31a79f04a537d12a3637a0cbe293600eb cython-0.29.2.tar.gz"