[arch-commits] Commit in python-tox/repos (2 files)
Felix Yan
fyan at archlinux.org
Sat Sep 19 16:40:04 UTC 2015
Date: Saturday, September 19, 2015 @ 18:40:04
Author: fyan
Revision: 140966
archrelease: copy trunk to community-staging-any
Added:
python-tox/repos/community-staging-any/
python-tox/repos/community-staging-any/PKGBUILD
(from rev 140965, python-tox/trunk/PKGBUILD)
----------+
PKGBUILD | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 75 insertions(+)
Copied: python-tox/repos/community-staging-any/PKGBUILD (from rev 140965, python-tox/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2015-09-19 16:40:04 UTC (rev 140966)
@@ -0,0 +1,75 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Thomas Weißschuh <thomas t-8ch.de>
+# Contributor: George Brooke <george+arch.aur at george-brooke.co.uk>
+# Contributor: Sebastian Wiesner <lunaryorn googlemail com>
+
+pkgbase=python-tox
+pkgname=(python-tox python2-tox)
+pkgver=2.1.1
+pkgrel=2
+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=('a03aa022a1f6f82cc21732af0ed48217a3c16873b98e16be22baa7cea74e1eef')
+
+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
+
+ XDG_CACHE_HOME="$srcdir" 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
+
+ XDG_CACHE_HOME="$srcdir" 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' 'python2-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}
+}
More information about the arch-commits
mailing list