Date: Tuesday, April 10, 2018 @ 06:17:16
  Author: felixonmars
Revision: 315524

archrelease: copy trunk to community-testing-any

Added:
  python-py-cpuinfo/repos/community-testing-any/
  python-py-cpuinfo/repos/community-testing-any/PKGBUILD
    (from rev 315523, python-py-cpuinfo/trunk/PKGBUILD)

----------+
 PKGBUILD |   55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

Copied: python-py-cpuinfo/repos/community-testing-any/PKGBUILD (from rev 
315523, python-py-cpuinfo/trunk/PKGBUILD)
===================================================================
--- community-testing-any/PKGBUILD                              (rev 0)
+++ community-testing-any/PKGBUILD      2018-04-10 06:17:16 UTC (rev 315524)
@@ -0,0 +1,55 @@
+# $Id$
+# Maintainer: Felix Yan <felixonm...@archlinux.org>
+
+pkgbase=python-py-cpuinfo
+pkgname=('python-py-cpuinfo' 'python2-py-cpuinfo')
+pkgver=4.0.0
+_commit=202e2fe4a362c9558cae074e7dbff1173d030437
+pkgrel=1
+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-$_commit.tar.gz::https://github.com/workhorsy/py-cpuinfo/archive/$_commit.tar.gz";)
+sha512sums=('149605f71b360938aa17e94ab0e8a0474750bd90deb73dc16fe032674f147fe65e5db79920299b4be32234221dca3bca1cb4ac297c625570a166c99b596d9ca2')
+
+prepare() {
+  mv py-cpuinfo-{$_commit,$pkgver}
+  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}
+}

Reply via email to