[arch-commits] Commit in python-pytest-sugar/repos (2 files)
Felix Yan
felixonmars at archlinux.org
Tue May 22 17:18:58 UTC 2018
Date: Tuesday, May 22, 2018 @ 17:18:57
Author: felixonmars
Revision: 327672
archrelease: copy trunk to community-any
Added:
python-pytest-sugar/repos/community-any/
python-pytest-sugar/repos/community-any/PKGBUILD
(from rev 327671, python-pytest-sugar/trunk/PKGBUILD)
----------+
PKGBUILD | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 59 insertions(+)
Copied: python-pytest-sugar/repos/community-any/PKGBUILD (from rev 327671, python-pytest-sugar/trunk/PKGBUILD)
===================================================================
--- community-any/PKGBUILD (rev 0)
+++ community-any/PKGBUILD 2018-05-22 17:18:57 UTC (rev 327672)
@@ -0,0 +1,59 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-pytest-sugar
+pkgname=('python-pytest-sugar' 'python2-pytest-sugar')
+pkgver=0.9.1
+_commit=b55eb17946009723096b3e9009837d7c10b6d1d3
+pkgrel=1
+pkgdesc='A plugin for py.test that changes the default look and feel of py.test'
+arch=('any')
+license=('BSD')
+url='https://github.com/Frozenball/pytest-sugar'
+makedepends=('python-pytest' 'python2-pytest' 'python-termcolor' 'python2-termcolor')
+source=("$pkgbase-$_commit.tar.gz::https://github.com/Frozenball/pytest-sugar/archive/$_commit.tar.gz")
+sha512sums=('118a8c5bc6194db22c71e7f6134b6c9fac36de1e7951878407250ca9231861a09f8a5d0eb5eec586a7343c1098d5390cbaa0b9af38aef52b461c43d8038f89bf')
+
+prepare() {
+ mv pytest-sugar-{$_commit,$pkgver}
+ cp -a pytest-sugar-$pkgver{,-py2}
+}
+
+build() {
+ cd "$srcdir"/pytest-sugar-$pkgver
+ python setup.py build
+
+ cd "$srcdir"/pytest-sugar-$pkgver-py2
+ python2 setup.py build
+}
+
+check() {
+ # Hack entry points by installing it
+ # Broken: https://github.com/Frozenball/pytest-sugar/issues/134
+
+ cd "$srcdir"/pytest-sugar-$pkgver
+ python setup.py install --root="$PWD/tmp_install" --optimize=1
+ PYTHONPATH="$PWD/tmp_install/usr/lib/python3.6/site-packages:$PYTHONPATH" py.test || warning "Tests failed"
+
+ cd "$srcdir"/pytest-sugar-$pkgver-py2
+ python2 setup.py install --root="$PWD/tmp_install" --optimize=1
+ PYTHONPATH="$PWD/tmp_install/usr/lib/python2.7/site-packages:$PYTHONPATH" py.test2 || warning "Tests failed"
+}
+
+package_python-pytest-sugar() {
+ depends=('python-pytest' 'python-termcolor')
+
+ cd pytest-sugar-$pkgver
+ python setup.py install --root="$pkgdir" --optimize=1
+ install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
+package_python2-pytest-sugar() {
+ depends=('python2-pytest' 'python2-termcolor')
+
+ cd pytest-sugar-$pkgver-py2
+ python2 setup.py install --root="$pkgdir" --optimize=1
+ install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
+# vim:set ts=2 sw=2 et:
More information about the arch-commits
mailing list