[arch-commits] Commit in python-regex/trunk (PKGBUILD)

Eli Schwartz eschwartz at archlinux.org
Wed Jan 10 22:45:35 UTC 2018


    Date: Wednesday, January 10, 2018 @ 22:45:34
  Author: eschwartz
Revision: 281203

upgpkg: python-regex 2018.01.10-2

add tests, split build into build()

Modified:
  python-regex/trunk/PKGBUILD

----------+
 PKGBUILD |   25 ++++++++++++++++++++++---
 1 file changed, 22 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2018-01-10 22:44:28 UTC (rev 281202)
+++ PKGBUILD	2018-01-10 22:45:34 UTC (rev 281203)
@@ -8,7 +8,7 @@
 pkgname=('python-regex' 'python2-regex')
 pkgname=python-regex
 pkgver=2018.01.10
-pkgrel=1
+pkgrel=2
 pkgdesc="Alternative python regular expression module."
 arch=('x86_64')
 url="https://bitbucket.org/mrabarnett/mrab-regex"
@@ -18,6 +18,25 @@
 source=(https://pypi.io/packages/source/r/${_pkgbase}/${_pkgbase}-${pkgver}.tar.gz)
 sha256sums=('139678fc013b75e486e580c39b4c52d085ed7362e400960f8be1711a414f16b5')
 
+build() {
+  cd "regex-${pkgver}"
+
+  python setup.py build
+  python2 setup.py build
+}
+
+check() {
+  cd "regex-${pkgver}"
+
+  pushd build/lib.linux-${CARCH}-3*/
+  python test_regex.py
+  popd
+
+  pushd build/lib.linux-${CARCH}-2*/
+  python2 test_regex.py
+  popd
+}
+
 package_python2-regex() {
   depends=('python2')
   conflicts=('python2-regex-hg')
@@ -24,7 +43,7 @@
   pkgdesc="Alternative python regular expression module. (python2 version)"
 
   cd "regex-${pkgver}"
-  python2 setup.py install --root="${pkgdir}/" --optimize=1
+  python2 setup.py install --root="${pkgdir}/" --optimize=1 --skip-build
 
   install -v -m755 -d "${pkgdir}/usr/share/doc/python2-regex"
   install -v -m644 ./docs/Features.html "${pkgdir}/usr/share/doc/python2-regex/"
@@ -38,7 +57,7 @@
   pkgdesc="Alternative python regular expression module. (python3 version)"
 
   cd "regex-${pkgver}"
-  python setup.py install --root="${pkgdir}/" --optimize=1
+  python setup.py install --root="${pkgdir}/" --optimize=1 --skip-build
 
   install -v -m755 -d "${pkgdir}/usr/share/doc/python-regex"
   install -v -m644 ./docs/Features.html "${pkgdir}/usr/share/doc/python-regex/"



More information about the arch-commits mailing list