diff options
author | Fabian Affolter <fabian@affolter-engineering.ch> | 2016-11-09 05:00:53 +0000 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2016-12-27 10:34:46 +0200 |
commit | 55c56ef599cc1f3279c1f922663abeef130e8f3e (patch) | |
tree | bc5c53e1003ed48c27b834a077c8ccbe94d9510f /testing/py-cpuinfo/APKBUILD | |
parent | 7745e71869dbb885ae5ec51ccf0c996065f74aaf (diff) | |
download | aports-55c56ef599cc1f3279c1f922663abeef130e8f3e.tar.bz2 aports-55c56ef599cc1f3279c1f922663abeef130e8f3e.tar.xz |
testing/py-cpuinfo: new aport
A module for getting CPU info with Python 2 & 3
https://github.com/workhorsy/py-cpuinfo
Diffstat (limited to 'testing/py-cpuinfo/APKBUILD')
-rw-r--r-- | testing/py-cpuinfo/APKBUILD | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/testing/py-cpuinfo/APKBUILD b/testing/py-cpuinfo/APKBUILD new file mode 100644 index 0000000000..60576fec9e --- /dev/null +++ b/testing/py-cpuinfo/APKBUILD @@ -0,0 +1,45 @@ +# Contributor: Fabian Affolter <fabian@affolter-engineering.ch> +# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch> +pkgname=py-cpuinfo +_pkgname=cpuinfo +pkgver=0.2.3 +pkgrel=0 +pkgdesc="A module for getting CPU info" +url="https://github.com/workhorsy/py-cpuinfo" +arch="noarch" +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 || return 1 + python3 setup.py build || return 1 +} + +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 +} + +md5sums="780ff46a0e122af09cb2c40b2706c6dc py-cpuinfo-0.2.3.tar.gz" +sha256sums="f6a016fdbc4e7fadf2d519090fcb4fa9d0831bad4e85245d938e5c2fe7623ca6 py-cpuinfo-0.2.3.tar.gz" +sha512sums="92616d0eaddd47e3fbdad49774aa023a73eb4f9e9b88848c5e2f93540ef8b1b1b8a5011b4148be2f9817eee4d34d5f158b7e37b0f27aab09c86cd4704dd53d7b py-cpuinfo-0.2.3.tar.gz" |