aboutsummaryrefslogtreecommitdiffstats
path: root/community
diff options
context:
space:
mode:
authorprspkt <prspkt@protonmail.com>2019-07-25 15:37:50 +0300
committerprspkt <prspkt@protonmail.com>2019-07-25 15:39:33 +0300
commitb188ee0a029a7e65dff2e8049bc8dafb5456fec5 (patch)
tree5d3a9bd7aae4cc23a30e72ff65383b9ec25ec013 /community
parent51c29b3b2b43563db0f18450b1eddb5d0e824f53 (diff)
downloadaports-b188ee0a029a7e65dff2e8049bc8dafb5456fec5.tar.bz2
aports-b188ee0a029a7e65dff2e8049bc8dafb5456fec5.tar.xz
community/py3-crcmod: drop python2
* Run test suite. Signed-off-by: prspkt <prspkt@protonmail.com>
Diffstat (limited to 'community')
-rw-r--r--community/py-crcmod/APKBUILD48
-rw-r--r--community/py3-crcmod/APKBUILD32
2 files changed, 32 insertions, 48 deletions
diff --git a/community/py-crcmod/APKBUILD b/community/py-crcmod/APKBUILD
deleted file mode 100644
index def398b262..0000000000
--- a/community/py-crcmod/APKBUILD
+++ /dev/null
@@ -1,48 +0,0 @@
-# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
-# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
-pkgname=py-crcmod
-_pkgname=${pkgname#py-}
-pkgver=1.7
-pkgrel=2
-pkgdesc="Cyclic Redundancy Check (CRC) implementation in Python"
-url="https://pypi.python.org/pypi/crcmod/"
-arch="all"
-license="MIT"
-depends=""
-makedepends="python2-dev python3-dev py-setuptools"
-subpackages="py3-$_pkgname:_py3 py2-$_pkgname:_py2"
-source="https://files.pythonhosted.org/packages/source/c/$_pkgname/$_pkgname-$pkgver.tar.gz"
-builddir="$srcdir"/$_pkgname-$pkgver
-
-build() {
- cd "$builddir"
- python2 setup.py build
- python3 setup.py build
-}
-
-package() {
- mkdir -p "$pkgdir"
-}
-
-_py() {
- local python="$1"
- pkgdesc="$pkgdesc (for $python)"
- install_if="$pkgname=$pkgver-r$pkgrel $python"
-
- cd "$builddir"
- $python setup.py install --prefix=/usr \
- --root="$subpkgdir" --optimize=1
-}
-
-_py2() {
- replaces="$pkgname"
- _py python2
-}
-
-_py3() {
- _py python3
-}
-
-md5sums="2d5b92117d958dcead94f9e17f54cd32 crcmod-1.7.tar.gz"
-sha256sums="dc7051a0db5f2bd48665a990d3ec1cc305a466a77358ca4492826f41f283601e crcmod-1.7.tar.gz"
-sha512sums="3c2f65004761c84f19d6ba95a0af74512108bad5007d9e20f8e684822e4196ce17073e58b47d2fa997e058e3d82782f3393458b6f0e86935418f38877d319a31 crcmod-1.7.tar.gz"
diff --git a/community/py3-crcmod/APKBUILD b/community/py3-crcmod/APKBUILD
new file mode 100644
index 0000000000..631f2a19a0
--- /dev/null
+++ b/community/py3-crcmod/APKBUILD
@@ -0,0 +1,32 @@
+# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
+# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
+pkgname=py3-crcmod
+_pkgname=crcmod
+pkgver=1.7
+pkgrel=3
+pkgdesc="Cyclic Redundancy Check (CRC) implementation in Python"
+url="https://pypi.python.org/pypi/crcmod/"
+arch="all"
+license="MIT"
+depends="python3"
+makedepends="python3-dev py3-setuptools"
+source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
+builddir="$srcdir"/$_pkgname-$pkgver
+
+replaces=py-crcmod # Backwards compatibility
+provides=py-crcmod=$pkgver-r$pkgrel # Backwards compatibility
+
+build() {
+ python3 setup.py build
+}
+
+check() {
+ cd "$builddir"/python3
+ python3 -m crcmod.test
+}
+
+package() {
+ python3 setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
+}
+
+sha512sums="3c2f65004761c84f19d6ba95a0af74512108bad5007d9e20f8e684822e4196ce17073e58b47d2fa997e058e3d82782f3393458b6f0e86935418f38877d319a31 crcmod-1.7.tar.gz"