aboutsummaryrefslogtreecommitdiffstats
path: root/main/py-atomicwrites/APKBUILD
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2018-09-04 15:05:16 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2018-09-04 15:28:09 +0000
commitb9e670d478bc4c47e8e2d95c8de6d449658fdbaf (patch)
tree1e36d4e55006fd8c67f0433f44ec01be90ee8e9f /main/py-atomicwrites/APKBUILD
parente1cacf3c7b04af8a9ec9e54170857f868fa5b773 (diff)
downloadaports-b9e670d478bc4c47e8e2d95c8de6d449658fdbaf.tar.bz2
aports-b9e670d478bc4c47e8e2d95c8de6d449658fdbaf.tar.xz
main/py-atomicwrites: move from community due to pytest
Diffstat (limited to 'main/py-atomicwrites/APKBUILD')
-rw-r--r--main/py-atomicwrites/APKBUILD45
1 files changed, 45 insertions, 0 deletions
diff --git a/main/py-atomicwrites/APKBUILD b/main/py-atomicwrites/APKBUILD
new file mode 100644
index 0000000000..48c51cb799
--- /dev/null
+++ b/main/py-atomicwrites/APKBUILD
@@ -0,0 +1,45 @@
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+pkgname=py-atomicwrites
+_pkgname=python-atomicwrites
+pkgver=1.1.5
+pkgrel=0
+pkgdesc="Powerful Python library for atomic file writes"
+url="https://github.com/untitaker/python-atomicwrites"
+arch="noarch"
+license="MIT"
+makedepends="python2-dev python3-dev py-setuptools"
+options="!check" # requires pytest which depends on this aport (cyclic dep)
+subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
+source="https://github.com/untitaker/python-atomicwrites/archive/$pkgver/$_pkgname-$pkgver.tar.gz"
+builddir="$srcdir/$_pkgname-$pkgver"
+
+build() {
+ cd "$builddir"
+ python2 setup.py build
+ python3 setup.py build
+}
+
+package() {
+ mkdir -p "$pkgdir"
+}
+
+_py2() {
+ _py python2
+}
+
+_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="8fba7bf6270c2a5d2925c14c4620e3b391fe333617ee3ddee5d3559d39ad9cbdd61fafc715bb9c1802b35079c18ae1a8330c29c24a9c980886b4a73660d3941a python-atomicwrites-1.1.5.tar.gz"