Skip to content

Commit

Permalink
addpkg: python-pytest 2.7.2-1
Browse files Browse the repository at this point in the history
  • Loading branch information
felixonmars committed Aug 6, 2015
1 parent 99e341c commit 68bfd1e
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions python-pytest/PKGBUILD
@@ -0,0 +1,45 @@
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Felix Kaiser <felix.kaiser@fxkr.net>

pkgbase=python-pytest
pkgname=('python3-pytest' 'python2-pytest')
pkgver=2.7.2
pkgrel=1
pkgdesc="Simple powerful testing with Python"
arch=('any')
license=('MIT')
url="http://pytest.org/"
makedepends=('python3-setuptools' 'python2-setuptools' 'python3-py' 'python2-py')
source=("https://pypi.python.org/packages/source/p/pytest/pytest-$pkgver.tar.gz")
sha512sums=('5474a4fe58437a4971fb21b1b37dad3c08e18e5d154931ff23e597f881100a3515bf0cf71d06b143465594ad2a91a96f84f4836d84c39691143c8d88ca7a4360')

prepare() {
cp -a pytest-${pkgver}{,-py2}
}

build() {
cd "$srcdir/pytest-${pkgver}"
python3 setup.py build

cd "$srcdir/pytest-${pkgver}-py2"
python2 setup.py build
}

package_python3-pytest() {
depends=('python3' 'python3-py' 'python3-setuptools')

cd pytest-${pkgver}
python3 setup.py install --root="${pkgdir}" --optimize=1
install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

package_python2-pytest() {
depends=('python2' 'python2-py' 'python2-setuptools')

cd pytest-${pkgver}-py2
python2 setup.py install --root="${pkgdir}" --optimize=1
install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"

mv "${pkgdir}/usr/bin/py.test" "${pkgdir}/usr/bin/py.test2"
}

0 comments on commit 68bfd1e

Please sign in to comment.