[arch-commits] Commit in python-py-cpuinfo/repos (2 files)
Evangelos Foutras
foutrelis at archlinux.org
Fri Oct 25 16:07:29 UTC 2019
Date: Friday, October 25, 2019 @ 16:07:28
Author: foutrelis
Revision: 519384
archrelease: copy trunk to community-staging-any
Added:
python-py-cpuinfo/repos/community-staging-any/
python-py-cpuinfo/repos/community-staging-any/PKGBUILD
(from rev 519383, python-py-cpuinfo/trunk/PKGBUILD)
----------+
PKGBUILD | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 52 insertions(+)
Copied: python-py-cpuinfo/repos/community-staging-any/PKGBUILD (from rev 519383, python-py-cpuinfo/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2019-10-25 16:07:28 UTC (rev 519384)
@@ -0,0 +1,52 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-py-cpuinfo
+pkgname=('python-py-cpuinfo' 'python2-py-cpuinfo')
+pkgver=5.0.0
+pkgrel=3
+arch=('any')
+pkgdesc='Get CPU info with pure Python 2 & 3'
+url='https://github.com/workhorsy/py-cpuinfo'
+license=('MIT')
+makedepends=('python-setuptools' 'python2-setuptools')
+checkdepends=('python-pytest-runner' 'python2-pytest-runner')
+source=("$pkgbase-$pkgver.tar.gz::https://github.com/workhorsy/py-cpuinfo/archive/v$pkgver.tar.gz")
+sha512sums=('186bae1745c927b613ac852819e046ef43b9b9322e4455d9fb0ce94d4ab7d3239a25d7bb01347f3a5a9dc80a0cc047feeb3af97ab85e5e995ff19a5f8b7a8129')
+
+prepare() {
+ cp -a py-cpuinfo-$pkgver{,-py2}
+}
+
+build() {
+ cd "$srcdir"/py-cpuinfo-$pkgver
+ python setup.py build
+
+ cd "$srcdir"/py-cpuinfo-$pkgver-py2
+ python2 setup.py build
+}
+
+check() {
+ cd "$srcdir"/py-cpuinfo-$pkgver
+ python setup.py pytest
+
+ cd "$srcdir"/py-cpuinfo-$pkgver-py2
+ python2 setup.py pytest
+}
+
+package_python-py-cpuinfo() {
+ depends=('python')
+
+ cd py-cpuinfo-$pkgver
+ python setup.py install --root "$pkgdir" --optimize=1
+ install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
+package_python2-py-cpuinfo() {
+ depends=('python2')
+
+ cd py-cpuinfo-$pkgver-py2
+ python2 setup.py install --root "$pkgdir" --optimize=1
+ install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+
+ mv "$pkgdir"/usr/bin/cpuinfo{,2}
+}
More information about the arch-commits
mailing list