aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorprspkt <prspkt@protonmail.com>2019-06-24 23:20:26 +0300
committerprspkt <prspkt@protonmail.com>2019-06-24 23:46:58 +0300
commitf6bb6d19682979e070f128795e57d37bd170d351 (patch)
tree46773eb0a866cdffcb64ccdf0e968f7ddf7c4cce
parent21bcfe76d2bd83248768735dfdde0955da3193ef (diff)
downloadaports-f6bb6d19682979e070f128795e57d37bd170d351.tar.bz2
aports-f6bb6d19682979e070f128795e57d37bd170d351.tar.xz
testing/py-cpuinfo: drop python2
-rw-r--r--testing/py-cpuinfo/APKBUILD49
-rw-r--r--testing/py3-py-cpuinfo/APKBUILD34
2 files changed, 34 insertions, 49 deletions
diff --git a/testing/py-cpuinfo/APKBUILD b/testing/py-cpuinfo/APKBUILD
deleted file mode 100644
index 1dfec33937..0000000000
--- a/testing/py-cpuinfo/APKBUILD
+++ /dev/null
@@ -1,49 +0,0 @@
-# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
-# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
-pkgname=py-cpuinfo
-_pkgname=cpuinfo
-pkgver=5.0.0
-pkgrel=1
-pkgdesc="A module for getting CPU info"
-url="https://github.com/workhorsy/py-cpuinfo"
-arch="noarch !s390x"
-license="MIT"
-makedepends="python2-dev py-setuptools python3-dev"
-subpackages="py3-$_pkgname:_py3 py2-$_pkgname:_py2"
-source="https://files.pythonhosted.org/packages/source/${pkgname:0:1}/$pkgname/$pkgname-$pkgver.tar.gz"
-builddir="$srcdir"/$pkgname-$pkgver
-
-build() {
- cd "$builddir"
- python2 setup.py build
- python3 setup.py build
-}
-
-check() {
- cd "$builddir"
- python2 setup.py test
- python3 setup.py test
-}
-
-package() {
- mkdir -p "$pkgdir"
-}
-
-_py() {
- local python=$1
- pkgdesc="$pkgdesc - $python"
- install_if="$pkgname=$pkgver-r$pkgrel $python"
- cd "$builddir"
- $python setup.py install --prefix=/usr --root="$subpkgdir"
-}
-
-_py2() {
- _py python2
- replaces="$pkgname"
-}
-
-_py3() {
- _py python3
-}
-
-sha512sums="d3a22ffdc4d1668a58330016e3297e57c07f6380e544497b1ad9dfcf0410b000f69418bf1cb9a434a2ffdbc8f17be89a25d33c65817913a823c6e181df6b760e py-cpuinfo-5.0.0.tar.gz"
diff --git a/testing/py3-py-cpuinfo/APKBUILD b/testing/py3-py-cpuinfo/APKBUILD
new file mode 100644
index 0000000000..eee04cf426
--- /dev/null
+++ b/testing/py3-py-cpuinfo/APKBUILD
@@ -0,0 +1,34 @@
+# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
+# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
+pkgname=py3-py-cpuinfo
+_pkgname=py-cpuinfo
+pkgver=5.0.0
+pkgrel=1
+pkgdesc="A module for getting CPU info"
+url="https://github.com/workhorsy/py3-cpuinfo"
+arch="noarch !s390x"
+license="MIT"
+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-cpuinfo" # Backwards compatibility
+provides="py-cpuinfo=$pkgver-r$pkgrel" # Backwards compatibility
+
+build() {
+ cd "$builddir"
+ python3 setup.py build
+}
+
+check() {
+ cd "$builddir"
+ python3 setup.py test
+}
+
+package() {
+ cd "$builddir"
+ python3 setup.py install --prefix=/usr --root="$pkgdir"
+}
+
+sha512sums="d3a22ffdc4d1668a58330016e3297e57c07f6380e544497b1ad9dfcf0410b000f69418bf1cb9a434a2ffdbc8f17be89a25d33c65817913a823c6e181df6b760e py-cpuinfo-5.0.0.tar.gz"