[arch-commits] Commit in python-pycontracts/repos (2 files)
Felix Yan
felixonmars at archlinux.org
Sat Dec 24 17:03:29 UTC 2016
Date: Saturday, December 24, 2016 @ 17:03:28
Author: felixonmars
Revision: 201591
archrelease: copy trunk to community-staging-any
Added:
python-pycontracts/repos/community-staging-any/
python-pycontracts/repos/community-staging-any/PKGBUILD
(from rev 201590, python-pycontracts/trunk/PKGBUILD)
----------+
PKGBUILD | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)
Copied: python-pycontracts/repos/community-staging-any/PKGBUILD (from rev 201590, python-pycontracts/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2016-12-24 17:03:28 UTC (rev 201591)
@@ -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.7.15
+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")
+sha256sums=('24bf3ab5cfd61d0e296af82fb8b73ba875ea09733a8ca562f53016cf980dc469')
+
+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