aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@alpinelinux.org>2018-09-16 21:42:25 +0000
committerCarlo Landmeter <clandmeter@alpinelinux.org>2018-09-16 21:43:19 +0000
commit075d366b60f971b756a134326e3bd9819b8b34bc (patch)
treeb13ba46baf9d4c6eb4fcbf80bb11b3ae43ca62c4
parent23fdf4b4f0d2f02b96ba7ff03f9a3a4b051ca74a (diff)
downloadaports-075d366b60f971b756a134326e3bd9819b8b34bc.tar.gz
aports-075d366b60f971b756a134326e3bd9819b8b34bc.tar.bz2
aports-075d366b60f971b756a134326e3bd9819b8b34bc.tar.xz
main/py-scandir: new aport
dep of py-pathlib2
-rw-r--r--main/py-scandir/APKBUILD52
1 files changed, 52 insertions, 0 deletions
diff --git a/main/py-scandir/APKBUILD b/main/py-scandir/APKBUILD
new file mode 100644
index 0000000000..18f00c629f
--- /dev/null
+++ b/main/py-scandir/APKBUILD
@@ -0,0 +1,52 @@
+# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
+# Maintainer: Carlo Landmeter <clandmeter@alpinelinux.org>
+pkgname=py-scandir
+pkgver=1.9.0
+pkgrel=0
+pkgdesc="Better directory iterator and faster os.walk(), now in the Python 3.5 stdlib"
+url="https://github.com/benhoyt/scandir"
+arch="noarch"
+license="MIT"
+source="py-scandir-$pkgver.tar.gz::https://github.com/benhoyt/scandir/archive/v$pkgver.tar.gz"
+builddir="$srcdir/scandir-$pkgver"
+depends=""
+makedepends="python2-dev python3-dev py-setuptools"
+subpackages="py2-${pkgname#py-}:_py2:all py3-${pkgname#py-}:_py3:all"
+
+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="af3f20fe19620a7ccc17b2661dbf2d61038c6c55f1e815bcc777ad3776b469d523bbf0ca1052212ee45d0fd932cd6f055cae3a18592ef8bac2078eeada4ec6f4 py-scandir-1.9.0.tar.gz"