Date: Wednesday, May 13, 2015 @ 05:25:20 Author: fyan Revision: 133354
archrelease: copy trunk to community-testing-any Added: python-tox/repos/community-testing-any/ python-tox/repos/community-testing-any/PKGBUILD (from rev 133353, python-tox/trunk/PKGBUILD) ----------+ PKGBUILD | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) Copied: python-tox/repos/community-testing-any/PKGBUILD (from rev 133353, python-tox/trunk/PKGBUILD) =================================================================== --- community-testing-any/PKGBUILD (rev 0) +++ community-testing-any/PKGBUILD 2015-05-13 03:25:20 UTC (rev 133354) @@ -0,0 +1,75 @@ +# $Id$ +# Maintainer: Felix Yan <felixonm...@archlinux.org> +# Contributor: Thomas Weißschuh <thomas t-8ch.de> +# Contributor: George Brooke <george+arch....@george-brooke.co.uk> +# Contributor: Sebastian Wiesner <lunaryorn googlemail com> + +pkgbase=python-tox +pkgname=(python-tox python2-tox) +pkgver=2.0.1 +pkgrel=1 +pkgdesc='Python virtualenv management and testing tool' +arch=('any') +url='http://testrun.org/tox/latest/' +license=('GPL2') +makedepends=('python-setuptools' 'python2-setuptools' 'python-py' 'python2-py' 'python-virtualenv' 'python2-virtualenv' 'python-pluggy' 'python2-pluggy') +checkdepends=('python-pytest' 'python2-pytest' 'python-pip' 'python2-pip') +source=("http://pypi.python.org/packages/source/t/tox/tox-${pkgver}.tar.gz") +sha256sums=('69a8e0742a96f6574209b23d34c2b058972a39e2c270542f852f97b27652c30d') + +prepare() { + cp -a tox-$pkgver{,-py2} +} + +build() { + cd "$srcdir/tox-$pkgver" + python setup.py build + + cd "$srcdir/tox-$pkgver-py2" + python2 setup.py build +} + +check() { + # TODO: Make the workaround less dirty + mkdir "$srcdir/bin" + touch "$srcdir/bin/tox" + chmod +x "$srcdir/bin/tox" + export PATH="$srcdir/bin:$PATH" + + cd "$srcdir/tox-$pkgver" + cat > "$srcdir/bin/tox" << EOF +#!/usr/bin/env python +import sys +from tox import cmdline +sys.exit(cmdline()) +EOF + + PYTHONPATH="$PWD/build/lib:$PYTHONPATH" py.test + + cd "$srcdir/tox-$pkgver-py2" + cat > "$srcdir/bin/tox" << EOF +#!/usr/bin/env python2 +import sys +from tox import cmdline +sys.exit(cmdline()) +EOF + + PYTHONPATH="$PWD/build/lib:$PYTHONPATH" py.test2 +} + +package_python-tox() { + depends=('python-py' 'python-virtualenv' 'python-setuptools' 'python-pluggy') + + cd "$srcdir/tox-$pkgver" + python setup.py install --root="$pkgdir" --optimize=1 + ln -s tox "${pkgdir}/usr/bin/tox3" +} + +package_python2-tox() { + depends=('python2-py' 'python2-virtualenv' 'python2-setuptools' 'python-pluggy') + + cd "$srcdir/tox-$pkgver" + python2 setup.py install --root="$pkgdir" --optimize=1 + mv "${pkgdir}"/usr/bin/tox{,2} + mv "${pkgdir}"/usr/bin/{tox-quickstart,tox2-quickstart} +}