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

Felix Yan fyan at archlinux.org
Mon Sep 21 03:12:24 UTC 2015


    Date: Monday, September 21, 2015 @ 05:12:24
  Author: fyan
Revision: 141334

archrelease: copy trunk to community-staging-any

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

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

Copied: python-pycontracts/repos/community-staging-any/PKGBUILD (from rev 141333, python-pycontracts/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD	                        (rev 0)
+++ community-staging-any/PKGBUILD	2015-09-21 03:12:24 UTC (rev 141334)
@@ -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