[arch-commits] Commit in python-pytest-django/repos (2 files)
Evangelos Foutras
foutrelis at archlinux.org
Sat Oct 26 20:24:19 UTC 2019
Date: Saturday, October 26, 2019 @ 20:24:19
Author: foutrelis
Revision: 520505
archrelease: copy trunk to community-staging-any
Added:
python-pytest-django/repos/community-staging-any/
python-pytest-django/repos/community-staging-any/PKGBUILD
(from rev 520504, python-pytest-django/trunk/PKGBUILD)
----------+
PKGBUILD | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 61 insertions(+)
Copied: python-pytest-django/repos/community-staging-any/PKGBUILD (from rev 520504, python-pytest-django/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2019-10-26 20:24:19 UTC (rev 520505)
@@ -0,0 +1,61 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-pytest-django
+pkgname=('python-pytest-django' 'python2-pytest-django')
+pkgver=3.5.1
+pkgrel=2
+pkgdesc="A Django plugin for py.test"
+arch=('any')
+license=('BSD')
+url="https://github.com/pytest-dev/pytest-django"
+makedepends=('python-pytest' 'python2-pytest' 'python-setuptools-scm' 'python2-setuptools-scm'
+ 'python2-pathlib')
+checkdepends=('python-django' 'python2-django' 'python-pytest-xdist' 'python2-pytest-xdist')
+source=("$pkgbase-$pkgver.tar.gz::https://github.com/pytest-dev/pytest-django/archive/v$pkgver.tar.gz")
+sha512sums=('ac6e014b8550b1d96c57588b5059ffef6ece4e6647813b7b26794762fb09c38a6e189dc63b5bbe0165bcd566b3c43a11f32b7ab4d4b271cc2d7989efd4d1d6ea')
+
+export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
+
+prepare() {
+ cp -a pytest-django-$pkgver{,-py2}
+}
+
+build() {
+ cd "$srcdir"/pytest-django-$pkgver
+ python setup.py build
+
+ cd "$srcdir"/pytest-django-$pkgver-py2
+ python2 setup.py build
+}
+
+check() {
+ # Hack entry points by installing it
+
+ cd "$srcdir"/pytest-django-$pkgver
+ python setup.py install --root="$PWD/tmp_install" --optimize=1
+ PYTHONPATH="$PWD/tmp_install/usr/lib/python3.8/site-packages:$PYTHONPATH:$PWD" \
+ DJANGO_SETTINGS_MODULE=pytest_django_test.settings_sqlite \
+ py.test tests
+
+ cd "$srcdir"/pytest-django-$pkgver-py2
+ python2 setup.py install --root="$PWD/tmp_install" --optimize=1
+ PYTHONPATH="$PWD/tmp_install/usr/lib/python2.7/site-packages:$PYTHONPATH:$PWD" \
+ DJANGO_SETTINGS_MODULE=pytest_django_test.settings_sqlite \
+ py.test2 tests
+}
+
+package_python-pytest-django() {
+ depends=('python-pytest')
+
+ cd pytest-django-$pkgver
+ python setup.py install --root="$pkgdir" --optimize=1
+ install -Dm664 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
+package_python2-pytest-django() {
+ depends=('python2-pytest' 'python2-pathlib')
+
+ cd pytest-django-$pkgver-py2
+ python2 setup.py install --root="$pkgdir" --optimize=1
+ install -Dm664 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
More information about the arch-commits
mailing list