aboutsummaryrefslogtreecommitdiffstats
path: root/community
diff options
context:
space:
mode:
authorHolger Jaekel <holger.jaekel@gmx.de>2020-05-06 19:46:29 +0200
committerHolger Jaekel <holger.jaekel@gmx.de>2020-05-06 19:46:29 +0200
commit6afa9e2ce0c20b0b9d5894e188553145f5b00c09 (patch)
treecd9d2970b02e8b401b0a2e7eed61cc0868ae7cdd /community
parent6de42d9dc71b875614b4eff1b61c66b7f3c4adf2 (diff)
downloadaports-6afa9e2ce0c20b0b9d5894e188553145f5b00c09.tar.bz2
aports-6afa9e2ce0c20b0b9d5894e188553145f5b00c09.tar.xz
community/py3-shapely: move from testing
Diffstat (limited to 'community')
-rw-r--r--community/py3-shapely/10-packaging.patch15
-rw-r--r--community/py3-shapely/APKBUILD57
2 files changed, 72 insertions, 0 deletions
diff --git a/community/py3-shapely/10-packaging.patch b/community/py3-shapely/10-packaging.patch
new file mode 100644
index 0000000000..0170fc274b
--- /dev/null
+++ b/community/py3-shapely/10-packaging.patch
@@ -0,0 +1,15 @@
+Author: Holger Jaekel <holger.jaekel@gmx.de>
+Summary: use Alpine py3-packaging instead of internal
+----
+
+--- a/setup.py
++++ b/setup.py
+@@ -73,7 +73,7 @@ except ImportError:
+ from distutils.errors import CCompilerError, DistutilsExecError, \
+ DistutilsPlatformError
+
+-from _vendor.packaging.version import Version
++from packaging.version import Version
+
+ # Get geos_version from GEOS dynamic library, which depends on
+ # GEOS_LIBRARY_PATH and/or GEOS_CONFIG environment variables
diff --git a/community/py3-shapely/APKBUILD b/community/py3-shapely/APKBUILD
new file mode 100644
index 0000000000..c5d892d5ac
--- /dev/null
+++ b/community/py3-shapely/APKBUILD
@@ -0,0 +1,57 @@
+# Contributor: Holger Jaekel <holger.jaekel@gmx.de>
+# Maintainer: Holger Jaekel <holger.jaekel@gmx.de>
+pkgname=py3-shapely
+pkgver=1.7.0
+pkgrel=0
+pkgdesc="Manipulation and analysis of geometric objects in the Cartesian plane"
+url="https://pypi.python.org/pypi/Shapely"
+arch="all !s390x !mips !mips64" # geos availability
+license="BSD-3-Clause"
+depends="
+ py3-numpy
+ "
+makedepends="
+ geos-dev
+ py3-matplotlib
+ py3-numpy-dev
+ py3-packaging
+ py3-setuptools
+ python3-dev
+ cython
+ "
+checkdepends="
+ py3-pytest
+ "
+source="
+ https://pypi.io/packages/source/S/Shapely/Shapely-$pkgver.tar.gz
+ 10-packaging.patch
+ "
+builddir="$srcdir/Shapely-$pkgver"
+
+build() {
+ rm -r _vendor # This is provided by py3-packaging
+
+ cython shapely/speedups/_speedups.pyx
+ cython shapely/vectorized/_vectorized.pyx
+
+ python3 setup.py build
+}
+
+check() {
+ # Tests fail on s390x
+ case "$CARCH" in
+ s390x) return 0 ;;
+ esac
+
+ # These examples are executed during test, but they depend on pylab, which is not in Alpine
+ rm -r shapely/examples/*
+
+ python3 setup.py test
+}
+
+package() {
+ python3 setup.py install --prefix=/usr --root="$pkgdir" --optimize=2
+}
+
+sha512sums="ff7a14f20c05e3949c1e689175b80ec1f8248a0f45370a6313dbf4319ec018a8fafcfd171efbaa81bd8ceaab9c54488feca61bb03067e22a275da2b8663dc8bc Shapely-1.7.0.tar.gz
+7cebaf4e059d71e1cd374539eb056491afbf736e05bf369a3c6533306885940d108340ada56ec7662e30aac04d2bd3ac4019ccf2fc447151d2274009d93d00fe 10-packaging.patch"