aboutsummaryrefslogtreecommitdiffstats
path: root/community
diff options
context:
space:
mode:
authorprspkt <prspkt@protonmail.com>2019-07-26 08:05:49 +0300
committerprspkt <prspkt@protonmail.com>2019-07-26 08:14:12 +0300
commit560b42e861be431245cfa88e11715e7cb59a3674 (patch)
tree020cea020e4b42c76e92e8391b8e0d8e778d03ac /community
parent5841fcdc82036705de82a96abf7a6d49ad70f4a4 (diff)
downloadaports-560b42e861be431245cfa88e11715e7cb59a3674.tar.bz2
aports-560b42e861be431245cfa88e11715e7cb59a3674.tar.xz
community/py-polib: drop python2
* Run test suite. Signed-off-by: prspkt <prspkt@protonmail.com>
Diffstat (limited to 'community')
-rw-r--r--community/py3-polib/APKBUILD (renamed from community/py-polib/APKBUILD)39
1 files changed, 9 insertions, 30 deletions
diff --git a/community/py-polib/APKBUILD b/community/py3-polib/APKBUILD
index f8139d0794..3dd8d99a43 100644
--- a/community/py-polib/APKBUILD
+++ b/community/py3-polib/APKBUILD
@@ -1,52 +1,31 @@
# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
-pkgname=py-polib
+pkgname=py3-polib
_pkgname=polib
pkgver=1.1.0
-pkgrel=1
+pkgrel=2
pkgdesc="A library to manipulate gettext files"
url="http://polib.readthedocs.org/en/latest/index.html"
arch="noarch"
license="MIT"
-makedepends="python2-dev python3-dev py-setuptools"
-subpackages="py3-${pkgname/py-/}:_py3 py2-${pkgname/py-/}:_py2"
+depends="python3"
+makedepends="py3-setuptools"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
-
builddir="$srcdir/$_pkgname-$pkgver"
+replaces=py-polib # Backwards compatibility
+provides=py-polib=$pkgver-r$pkgrel # Backwards compatibility
+
build() {
- cd "$builddir"
- python2 setup.py build
python3 setup.py build
}
check() {
- cd "$builddir"
- python2 setup.py check
- python3 setup.py check
+ python3 tests/tests.py
}
package() {
- mkdir -p "$pkgdir"
-}
-
-_py() {
- local python=$1
- pkgdesc="$pkgdesc (for $python)"
- depends="$python libmagic"
- install_if="$pkgname=$pkgver-r$pkgrel $python"
-
- cd "$builddir"
- $python setup.py install --prefix=/usr --root="$subpkgdir"
-}
-
-_py2() {
- replaces="$pkgname"
- _py python2
-}
-
-_py3() {
- _py python3
+ python3 setup.py install --prefix=/usr --root="$pkgdir"
}
sha512sums="74681585b4d7252e107acd7d73f49f7e91c90adcd180722d39d35c40ec158434798af0124a16788cf564c73b84f52a040aefeb58355a1a3cd85848c3f6a5e67f polib-1.1.0.tar.gz"