# $Id$ # Maintainer: Angel Velasquez # Contributor: Kaiting Chen # Contributor: Douglas Soares de Andrade # Contributor: Armando M. Baratti # Contributor: Florian Richter pkgname=('python-cherrypy' 'python2-cherrypy') pkgver=8.9.1 pkgrel=2 pkgdesc="A pythonic, object-oriented web development framework" arch=('any') url="http://www.cherrypy.org" license=('BSD') makedepends=('python' 'python-setuptools' 'python2' 'python2-setuptools') checkdepends=('python2-mock') source=("https://pypi.python.org/packages/56/aa/91005730bdc5c0da8291a2f411aacbc5c3729166c382e2193e33f28044a3/CherryPy-8.9.1.tar.gz") md5sums=('7abe5198e48f14cfee57a07d23875a4b') build() { cp -r CherryPy-${pkgver} CherryPy-${pkgver}-py2 cd CherryPy-${pkgver} python ./setup.py build cd "${srcdir}/CherryPy-${pkgver}-py2" python2 ./setup.py build } package_python-cherrypy() { depends=('python' 'python-six') cd CherryPy-${pkgver} python ./setup.py install --root="${pkgdir}" --optimize=1 install -Dm644 LICENSE.md \ "${pkgdir}/usr/share/licenses/python-cherrypy/LICENSE.md" } package_python2-cherrypy() { depends=('python2') cd CherryPy-${pkgver}-py2 python2 ./setup.py install --root="${pkgdir}" --optimize=1 mv "${pkgdir}/usr/bin/cherryd" "${pkgdir}/usr/bin/cherryd2" install -Dm644 LICENSE.md \ "${pkgdir}/usr/share/licenses/python2-cherrypy/LICENSE.md" } check() { # backports.unittest_mock is not packaged.. cd CherryPy-${pkgver}-py2/cherrypy #LANG="en_US.UTF-8" pytest2 test/ cd $srcdir/CherryPy-${pkgver}/cherrypy LANG="en_US.UTF-8" nosetests test/ }