[arch-commits] Commit in python-pycontracts/repos (2 files)

Felix Yan felixonmars at archlinux.org
Sat Jun 30 03:09:06 UTC 2018


    Date: Saturday, June 30, 2018 @ 03:09:06
  Author: felixonmars
Revision: 347868

archrelease: copy trunk to community-staging-any

Added:
  python-pycontracts/repos/community-staging-any/
  python-pycontracts/repos/community-staging-any/PKGBUILD
    (from rev 347867, python-pycontracts/trunk/PKGBUILD)

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

Copied: python-pycontracts/repos/community-staging-any/PKGBUILD (from rev 347867, python-pycontracts/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD	                        (rev 0)
+++ community-staging-any/PKGBUILD	2018-06-30 03:09:06 UTC (rev 347868)
@@ -0,0 +1,51 @@
+# $Id: PKGBUILD 140810 2015-09-19 13:17:30Z fyan $
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-pycontracts
+pkgname=(python-pycontracts python2-pycontracts)
+pkgver=1.8.3
+pkgrel=2
+pkgdesc='Declare constraints on function parameters and return values'
+arch=('any')
+url="https://andreacensi.github.io/contracts"
+license=('GPL')
+makedepends=('python-setuptools' 'python2-setuptools' 'python-pyparsing' 'python2-pyparsing'
+             'python-decorator' 'python2-decorator' 'python-six' 'python2-six')
+checkdepends=('python-nose' 'python2-nose')
+source=("https://pypi.io/packages/source/P/PyContracts/PyContracts-$pkgver.tar.gz")
+sha512sums=('470c093caaa1289da6f9bf40a3ea4e7b4099a3702a0941e398aaf0507a70630b64499b4f718bbb404ae36433433d534df4d0089dda9a5576895f9c2aff5b82fb')
+
+prepare() {
+  cp -a PyContracts-$pkgver{,-py2}
+}
+
+build() {
+  cd "$srcdir"/PyContracts-$pkgver
+  python setup.py build
+
+  cd "$srcdir"/PyContracts-$pkgver-py2
+  python2 setup.py build
+}
+
+check() {
+  cd "$srcdir"/PyContracts-$pkgver
+  python setup.py nosetests
+
+  cd "$srcdir"/PyContracts-$pkgver-py2
+  rm -r src/contracts-py3k-test
+  python2 setup.py nosetests
+}
+
+package_python-pycontracts() {
+  depends=('python-pyparsing' 'python-decorator' 'python-six')
+
+  cd PyContracts-$pkgver
+  python setup.py install --root="$pkgdir" --optimize=1
+}
+
+package_python2-pycontracts() {
+  depends=('python2-pyparsing' 'python2-decorator' 'python2-six')
+
+  cd PyContracts-$pkgver-py2
+  python2 setup.py install --root="$pkgdir" --optimize=1
+}



More information about the arch-commits mailing list