[arch-commits] Commit in python-py-cpuinfo/repos (2 files)
Felix Yan
felixonmars at archlinux.org
Mon Oct 9 19:48:49 UTC 2017
Date: Monday, October 9, 2017 @ 19:48:48
Author: felixonmars
Revision: 262242
archrelease: copy trunk to community-any
Added:
python-py-cpuinfo/repos/community-any/
python-py-cpuinfo/repos/community-any/PKGBUILD
(from rev 262241, python-py-cpuinfo/trunk/PKGBUILD)
----------+
PKGBUILD | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 55 insertions(+)
Copied: python-py-cpuinfo/repos/community-any/PKGBUILD (from rev 262241, python-py-cpuinfo/trunk/PKGBUILD)
===================================================================
--- community-any/PKGBUILD (rev 0)
+++ community-any/PKGBUILD 2017-10-09 19:48:48 UTC (rev 262242)
@@ -0,0 +1,55 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-py-cpuinfo
+pkgname=('python-py-cpuinfo' 'python2-py-cpuinfo')
+pkgver=3.3.0
+_commit=894ff3fdbf67953b089e93597b0c361e50968170
+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=('b26ba68b1eb28e71c131b979672deeede95de9a8986aa8dc448002a7d0b2baa05264974102f01d258c0201d507c3bd7a3c683ef64add5271751808cf86b83bf3')
+
+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}
+}
More information about the arch-commits
mailing list