aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorprspkt <prspkt@protonmail.com>2019-07-22 00:55:20 +0300
committerprspkt <prspkt@protonmail.com>2019-07-22 01:08:18 +0300
commitfe1b05f5be75193fea0afc8f8b840ba7ef1454c7 (patch)
tree37cd70e700ddf27b0d16eb5be97e4f676a46dadf
parentb8357ce59df9700d442e6a992378780323f480cc (diff)
downloadaports-fe1b05f5be75193fea0afc8f8b840ba7ef1454c7.tar.bz2
aports-fe1b05f5be75193fea0afc8f8b840ba7ef1454c7.tar.xz
testing/py-daemonize: drop python2, modernize
-rw-r--r--testing/py-daemonize/APKBUILD47
-rw-r--r--testing/py3-daemonize/APKBUILD27
2 files changed, 27 insertions, 47 deletions
diff --git a/testing/py-daemonize/APKBUILD b/testing/py-daemonize/APKBUILD
deleted file mode 100644
index 876c3b1022..0000000000
--- a/testing/py-daemonize/APKBUILD
+++ /dev/null
@@ -1,47 +0,0 @@
-# Maintainer: Luca Weiss <luca@z3ntu.xyz>
-pkgname=py-daemonize
-_pkgname=daemonize
-pkgver=2.5.0
-pkgrel=0
-pkgdesc="Library to enable your code run as a daemon process on Unix-like systems."
-url="https://github.com/thesharp/daemonize"
-arch="noarch"
-license="MIT"
-makedepends="python2-dev python3-dev py-setuptools"
-subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
-source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
-options="!check" # No testsuite
-builddir="$srcdir/$_pkgname-$pkgver"
-
-build() {
- cd "$builddir"
- python2 setup.py build
- python3 setup.py build
-}
-
-package() {
- mkdir -p "$pkgdir"
-}
-
-_py2() {
- replaces="$pkgname"
- 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="5043db681b36028e3168cd2ad86235e0962bbdc46ded2f631ab36846083b0817524cddd7a9333997a82b4888b2490391bac2e1cfd043c1ddc129da54d2cbd6bd daemonize-2.5.0.tar.gz"
diff --git a/testing/py3-daemonize/APKBUILD b/testing/py3-daemonize/APKBUILD
new file mode 100644
index 0000000000..7e0876cf59
--- /dev/null
+++ b/testing/py3-daemonize/APKBUILD
@@ -0,0 +1,27 @@
+# Maintainer: Luca Weiss <luca@z3ntu.xyz>
+pkgname=py3-daemonize
+_pkgname=daemonize
+pkgver=2.5.0
+pkgrel=1
+pkgdesc="Library for writing system daemons in Python"
+url="https://github.com/thesharp/daemonize"
+arch="noarch"
+license="MIT"
+depends="python3"
+makedepends="py3-setuptools"
+source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
+options="!check" # No testsuite
+builddir="$srcdir/$_pkgname-$pkgver"
+
+replaces=py-daemonize # Backwards compatibility
+provides=py-daemonize=$pkgver-r$pkgrel # Backwards compatibility
+
+build() {
+ python3 setup.py build
+}
+
+package() {
+ python3 setup.py install --prefix=/usr --root="$pkgdir"
+}
+
+sha512sums="5043db681b36028e3168cd2ad86235e0962bbdc46ded2f631ab36846083b0817524cddd7a9333997a82b4888b2490391bac2e1cfd043c1ddc129da54d2cbd6bd daemonize-2.5.0.tar.gz"