summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2021-09-24 21:25:05 +0200
committerMichał Górny <mgorny@gentoo.org>2021-09-24 21:28:43 +0200
commitaf91f79823183f95c8de5011cc62168812ff3547 (patch)
tree80344fe5fdada94bccaf1eb584dd0f59c948c1cf /dev-python/django-filter
parentdev-python/filetype: Bump to 1.0.8 (diff)
downloadgentoo-af91f79823183f95c8de5011cc62168812ff3547.tar.gz
gentoo-af91f79823183f95c8de5011cc62168812ff3547.tar.bz2
gentoo-af91f79823183f95c8de5011cc62168812ff3547.zip
dev-python/django-filter: Bump to 21.1
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/django-filter')
-rw-r--r--dev-python/django-filter/Manifest1
-rw-r--r--dev-python/django-filter/django-filter-21.1.ebuild29
-rw-r--r--dev-python/django-filter/files/django-filter-21.1-test-skipIf.patch27
3 files changed, 57 insertions, 0 deletions
diff --git a/dev-python/django-filter/Manifest b/dev-python/django-filter/Manifest
index d5150fd906a5..1a587dada8f2 100644
--- a/dev-python/django-filter/Manifest
+++ b/dev-python/django-filter/Manifest
@@ -1 +1,2 @@
DIST django-filter-2.4.0.tar.gz 146904 BLAKE2B 994b07c0f5e511451964f4f1e007ff9906975600d0bc8a02dcbeb86f91bf906490ca394ca95c23c57c1fff25a447f50a40054c0abfe385300f9db87645753978 SHA512 0584222b46add89aa7dd1dfd334fdd19903e0119d455a2c46644c501a66df224f9f51c33394d130bcd1fc0f28c6ede6d6853b9790430040ec7228f9a1dc55264
+DIST django-filter-21.1.tar.gz 154188 BLAKE2B f0ae3119a1dfa466e6630f7da44db1531172991b137fe9420ed533a7b3d4177f689f07fed115566854bd40e5e23f4e9f2f73be32188af2c067a81a95fbccc5a3 SHA512 df2b02bfa93874d9684a26394778203b827c6459ab8cc8c581677e6ccfeedf1323085f53fb52cfc3e0e0a3d27f86de655366bcd4be361502ce86e65b4a4e84d0
diff --git a/dev-python/django-filter/django-filter-21.1.ebuild b/dev-python/django-filter/django-filter-21.1.ebuild
new file mode 100644
index 000000000000..bf4e7366b1b4
--- /dev/null
+++ b/dev-python/django-filter/django-filter-21.1.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+inherit distutils-r1
+
+DESCRIPTION="Django app allowing declarative dynamic QuerySet filtering from URL parameters"
+HOMEPAGE="https://github.com/carltongibson/django-filter"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+RDEPEND=">=dev-python/django-1.11[${PYTHON_USEDEP}]"
+BDEPEND="test? ( ${RDEPEND} )"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-test-skipIf.patch
+)
+
+python_test() {
+ local -x DJANGO_SETTINGS_MODULE=tests.settings
+ django-admin test -v 2 || die
+}
diff --git a/dev-python/django-filter/files/django-filter-21.1-test-skipIf.patch b/dev-python/django-filter/files/django-filter-21.1-test-skipIf.patch
new file mode 100644
index 000000000000..adaf8ba428d1
--- /dev/null
+++ b/dev-python/django-filter/files/django-filter-21.1-test-skipIf.patch
@@ -0,0 +1,27 @@
+From db97686a9950cc1a372d27dfbb90b19ceece3f65 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Fri, 24 Sep 2021 21:22:41 +0200
+Subject: [PATCH] Fix inverted skipIf for CrispyFormsCompatTests tests
+
+The test is being wrongly skipped when crispy_forms are installed
+rather than the other way around.
+---
+ tests/rest_framework/test_filterset.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/rest_framework/test_filterset.py b/tests/rest_framework/test_filterset.py
+index f8b5aae..b6a658d 100644
+--- a/tests/rest_framework/test_filterset.py
++++ b/tests/rest_framework/test_filterset.py
+@@ -38,7 +38,7 @@ class FilterSetFilterForFieldTests(TestCase):
+ self.assertEqual(result.extra['widget'], BooleanWidget)
+
+
+-@skipIf(is_crispy(), 'django_crispy_forms must be installed')
++@skipIf(not is_crispy(), 'django_crispy_forms must be installed')
+ @override_settings(INSTALLED_APPS=settings.INSTALLED_APPS + ('crispy_forms', ))
+ class CrispyFormsCompatTests(TestCase):
+
+--
+2.33.0
+