[arch-commits] Commit in python-pytest-django/repos/community-any (3 files)
Felix Yan
fyan at archlinux.org
Sat Sep 12 07:37:47 UTC 2015
Date: Saturday, September 12, 2015 @ 09:37:46
Author: fyan
Revision: 139957
archrelease: copy trunk to community-any
Added:
python-pytest-django/repos/community-any/PKGBUILD
(from rev 139956, python-pytest-django/trunk/PKGBUILD)
python-pytest-django/repos/community-any/remove-assertion-in-django_settings_is_configured.patch
(from rev 139956, python-pytest-django/trunk/remove-assertion-in-django_settings_is_configured.patch)
Deleted:
python-pytest-django/repos/community-any/PKGBUILD
---------------------------------------------------------+
PKGBUILD | 125 +++++++-------
remove-assertion-in-django_settings_is_configured.patch | 27 +++
2 files changed, 92 insertions(+), 60 deletions(-)
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2015-09-12 07:37:31 UTC (rev 139956)
+++ PKGBUILD 2015-09-12 07:37:46 UTC (rev 139957)
@@ -1,60 +0,0 @@
-# $Id$
-# Maintainer: Felix Yan <felixonmars at archlinux.org>
-
-pkgbase=python-pytest-django
-pkgname=('python-pytest-django' 'python2-pytest-django')
-pkgver=2.8.0
-pkgrel=1
-pkgdesc="A Django plugin for py.test"
-arch=('any')
-license=('BSD')
-url="https://github.com/pytest-dev/pytest-django"
-makedepends=('python-pytest' 'python2-pytest' 'git')
-checkdepends=('python-django' 'python2-django' 'python-pytest-xdist' 'python2-pytest-xdist'
- 'twine' 'python2-twine' 'python-south' 'python2-south')
-source=("git+https://github.com/pytest-dev/pytest-django.git#tag=v$pkgver")
-sha512sums=('SKIP')
-
-prepare() {
- cp -a pytest-django{,-py2}
-}
-
-build() {
- cd "$srcdir/pytest-django"
- python setup.py build
-
- cd "$srcdir/pytest-django-py2"
- python2 setup.py build
-}
-
-check() {
- # Hack entry points by installing it
-
- cd "$srcdir/pytest-django"
- python setup.py install --root="$PWD/tmp_install" --optimize=1
- PYTHONPATH="$PWD/tmp_install/usr/lib/python3.4/site-packages:$PYTHONPATH:$PWD" \
- DJANGO_SETTINGS_MODULE=pytest_django_test.settings_sqlite \
- py.test tests || warning "Tests failed"
-
- cd "$srcdir/pytest-django-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
- python setup.py install --root="${pkgdir}" --optimize=1
- install -Dm664 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
-}
-
-package_python2-pytest-django() {
- depends=('python2-pytest')
-
- cd pytest-django-py2
- python2 setup.py install --root="${pkgdir}" --optimize=1
- install -Dm664 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
-}
Copied: python-pytest-django/repos/community-any/PKGBUILD (from rev 139956, python-pytest-django/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2015-09-12 07:37:46 UTC (rev 139957)
@@ -0,0 +1,65 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-pytest-django
+pkgname=('python-pytest-django' 'python2-pytest-django')
+pkgver=2.8.0
+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' 'git')
+checkdepends=('python-django' 'python2-django' 'python-pytest-xdist' 'python2-pytest-xdist'
+ 'twine' 'python2-twine' 'python-south' 'python2-south')
+source=("git+https://github.com/pytest-dev/pytest-django.git#tag=v$pkgver"
+ remove-assertion-in-django_settings_is_configured.patch)
+sha512sums=('SKIP'
+ '3f94b06e83c31a949b0bee5ec9220d137ee4c594e4428f6b22f9e73bb2dbdeb6c2e92561343b940acfda4408b5dc756d3d4c5828818f3554bca644b9bdca9781')
+
+prepare() {
+ # https://github.com/pytest-dev/pytest-django/issues/146
+ (cd pytest-django; patch -p1 -i ../remove-assertion-in-django_settings_is_configured.patch)
+
+ cp -a pytest-django{,-py2}
+}
+
+build() {
+ cd "$srcdir/pytest-django"
+ python setup.py build
+
+ cd "$srcdir/pytest-django-py2"
+ python2 setup.py build
+}
+
+check() {
+ # Hack entry points by installing it
+
+ cd "$srcdir/pytest-django"
+ python setup.py install --root="$PWD/tmp_install" --optimize=1
+ PYTHONPATH="$PWD/tmp_install/usr/lib/python3.4/site-packages:$PYTHONPATH:$PWD" \
+ DJANGO_SETTINGS_MODULE=pytest_django_test.settings_sqlite \
+ py.test tests || warning "Tests failed"
+
+ cd "$srcdir/pytest-django-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
+ python setup.py install --root="${pkgdir}" --optimize=1
+ install -Dm664 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
+
+package_python2-pytest-django() {
+ depends=('python2-pytest')
+
+ cd pytest-django-py2
+ python2 setup.py install --root="${pkgdir}" --optimize=1
+ install -Dm664 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
Copied: python-pytest-django/repos/community-any/remove-assertion-in-django_settings_is_configured.patch (from rev 139956, python-pytest-django/trunk/remove-assertion-in-django_settings_is_configured.patch)
===================================================================
--- remove-assertion-in-django_settings_is_configured.patch (rev 0)
+++ remove-assertion-in-django_settings_is_configured.patch 2015-09-12 07:37:46 UTC (rev 139957)
@@ -0,0 +1,27 @@
+From 963e04688a19e125b86ba026d3ef09e4afe17f69 Mon Sep 17 00:00:00 2001
+From: Daniel Hahler <git at thequod.de>
+Date: Mon, 2 Mar 2015 19:38:22 +0100
+Subject: [PATCH] Remove assertion in django_settings_is_configured
+
+django.conf.settings.configured is not necessarily True, in case DSM
+wasn't set during `pytest_load_initial_conftests`, but gets set in the
+project's conftest (via `pytest_configure`).
+
+Fixes https://github.com/pytest-dev/pytest-django/issues/146
+---
+ pytest_django/lazy_django.py | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/pytest_django/lazy_django.py b/pytest_django/lazy_django.py
+index 8458040..4ba4d5a 100644
+--- a/pytest_django/lazy_django.py
++++ b/pytest_django/lazy_django.py
+@@ -22,8 +22,6 @@ def django_settings_is_configured():
+
+ # If DJANGO_SETTINGS_MODULE is defined at this point, Django is assumed to
+ # always be loaded.
+- from django.conf import settings
+- assert settings.configured is True
+ return True
+
+
More information about the arch-commits
mailing list