aboutsummaryrefslogtreecommitdiffstats
path: root/main/py-pathlib2
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@alpinelinux.org>2018-09-16 21:43:41 +0000
committerCarlo Landmeter <clandmeter@alpinelinux.org>2018-09-16 21:43:41 +0000
commita46635a804b8b4609dde1278c498d68edca81928 (patch)
tree92957b3814eddf70a9ef608670cf0f9cc8f39d51 /main/py-pathlib2
parent075d366b60f971b756a134326e3bd9819b8b34bc (diff)
downloadaports-a46635a804b8b4609dde1278c498d68edca81928.tar.bz2
aports-a46635a804b8b4609dde1278c498d68edca81928.tar.xz
main/py-pathlib2: new aport
dep of pytest
Diffstat (limited to 'main/py-pathlib2')
-rw-r--r--main/py-pathlib2/APKBUILD52
1 files changed, 52 insertions, 0 deletions
diff --git a/main/py-pathlib2/APKBUILD b/main/py-pathlib2/APKBUILD
new file mode 100644
index 0000000000..c4531fcd40
--- /dev/null
+++ b/main/py-pathlib2/APKBUILD
@@ -0,0 +1,52 @@
+# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
+# Maintainer: Carlo Landmeter <clandmeter@alpinelinux.org>
+pkgname=py-pathlib2
+pkgver=2.3.2
+pkgrel=0
+pkgdesc="Fork of pathlib aiming to support the full stdlib Python API"
+url="https://github.com/mcmtroffaes/pathlib2"
+arch="noarch"
+license="MIT"
+source="pathlib2-$pkgver.tar.gz::https://github.com/mcmtroffaes/pathlib2/archive/$pkgver.tar.gz"
+builddir="$srcdir/pathlib2-$pkgver"
+depends="py-six py-scandir"
+makedepends="python2-dev python3-dev py-setuptools"
+subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
+
+build() {
+ cd "$builddir"
+ python2 setup.py build
+ python3 setup.py build
+}
+
+check() {
+ cd "$builddir"
+ python2 setup.py test
+ python3 setup.py test
+}
+
+package() {
+ mkdir -p "$pkgdir"
+}
+
+_py2() {
+ depends="${depends//py-/py2-}"
+ _py python2
+}
+
+_py3() {
+ depends="${depends//py-/py3-}"
+ _py python3
+}
+
+_py() {
+ local python="$1"
+ pkgdesc="$pkgdesc (for $python)"
+ depends="$depends $python"
+ install_if="$pkgname=$pkgver-r$pkgrel $python"
+
+ cd "$builddir"
+ $python setup.py install --prefix=/usr --root="$subpkgdir"
+}
+
+sha512sums="ef73d74cf628f1a01a24e786b6e21de076dfcc203c304b155cae88a2da40cd017300a56777c5aaa64f613c946452541b77fbad610b125603972565c1d33a3245 pathlib2-2.3.2.tar.gz"