aboutsummaryrefslogtreecommitdiffstats
path: root/main/py3-filelock/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'main/py3-filelock/APKBUILD')
-rw-r--r--main/py3-filelock/APKBUILD52
1 files changed, 52 insertions, 0 deletions
diff --git a/main/py3-filelock/APKBUILD b/main/py3-filelock/APKBUILD
new file mode 100644
index 0000000000..69b5506ba4
--- /dev/null
+++ b/main/py3-filelock/APKBUILD
@@ -0,0 +1,52 @@
+# Contributor: Dmitry Romanenko <dmitry@romanenko.in>
+# Maintainer: Dmitry Romanenko <dmitry@romanenko.in>
+pkgname=py-filelock
+_pkgname=filelock
+pkgver=3.0.12
+pkgrel=0
+pkgdesc="A platform independent file lock for Python"
+url="https://github.com/benediktschmitt/py-filelock"
+arch="noarch"
+license="Unlicense"
+depends=""
+checkdepends="pytest"
+makedepends="python2-dev python3-dev py-setuptools"
+subpackages="py3-$_pkgname:_py3 py2-$_pkgname:_py2"
+source="https://files.pythonhosted.org/packages/source/f/$_pkgname/$_pkgname-$pkgver.tar.gz"
+builddir="$srcdir"/$_pkgname-$pkgver
+
+build() {
+ cd "$builddir"
+ python2 setup.py build
+ python3 setup.py build
+}
+
+check() {
+ cd "$builddir"
+ python2 -m pytest -xvv test.py
+ python3 -m pytest -xvv test.py
+}
+
+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="09b8b16c12a60044a259a5d644bc8066660871104a7f4cd431431173d475b9f15744adfb8d86ec8cda69f2a1b52bd14cb8a066d70fa5e49c449bc5ee702ec2a0 filelock-3.0.12.tar.gz"