[arch-commits] Commit in (4 files)
Felix Yan
fyan at archlinux.org
Mon Sep 21 03:09:01 UTC 2015
Date: Monday, September 21, 2015 @ 05:09:01
Author: fyan
Revision: 141333
addpkg: python-pycontracts 1.7.6-1
Added:
python-pycontracts/
python-pycontracts/repos/
python-pycontracts/trunk/
python-pycontracts/trunk/PKGBUILD
----------+
PKGBUILD | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)
Added: python-pycontracts/trunk/PKGBUILD
===================================================================
--- python-pycontracts/trunk/PKGBUILD (rev 0)
+++ python-pycontracts/trunk/PKGBUILD 2015-09-21 03:09:01 UTC (rev 141333)
@@ -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)
+_pypiname=PyContracts
+pkgver=1.7.6
+pkgrel=1
+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=("http://pypi.python.org/packages/source/${_pypiname:0:1}/${_pypiname}/${_pypiname}-${pkgver}.tar.gz")
+sha256sums=('94814b376b168483edeee33fdf1a04d892065d0bdfe0638d281c285d1f3e42bf')
+
+prepare() {
+ cp -a $_pypiname-$pkgver{,-py2}
+}
+
+build() {
+ cd "${srcdir}/${_pypiname}-${pkgver}"
+ python setup.py build
+
+ cd "${srcdir}/${_pypiname}-${pkgver}-py2"
+ python2 setup.py build
+}
+
+check() {
+ cd "${srcdir}/${_pypiname}-${pkgver}"
+ PYTHONPATH="$PWD/build/lib:$PYTHONPATH" nosetests3
+
+ cd "${srcdir}/${_pypiname}-${pkgver}-py2"
+ PYTHONPATH="$PWD/build/lib:$PYTHONPATH" nosetests2
+}
+
+package_python-pycontracts() {
+ depends=('python-pyparsing' 'python-decorator' 'python-six')
+
+ cd "${srcdir}/${_pypiname}-${pkgver}"
+ python setup.py install --root="${pkgdir}" --optimize=1
+}
+
+package_python2-pycontracts() {
+ depends=('python2-pyparsing' 'python2-decorator' 'python2-six')
+
+ cd "${srcdir}/${_pypiname}-${pkgver}"
+ python2 setup.py install --root="${pkgdir}" --optimize=1
+}
More information about the arch-commits
mailing list