Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/django-filter/, dev-python/django-filter/files/
Date: Fri, 24 Sep 2021 19:28:50
Message-Id: 1632511723.af91f79823183f95c8de5011cc62168812ff3547.mgorny@gentoo
1 commit: af91f79823183f95c8de5011cc62168812ff3547
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Fri Sep 24 19:25:05 2021 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Fri Sep 24 19:28:43 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=af91f798
7
8 dev-python/django-filter: Bump to 21.1
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/django-filter/Manifest | 1 +
13 dev-python/django-filter/django-filter-21.1.ebuild | 29 ++++++++++++++++++++++
14 .../files/django-filter-21.1-test-skipIf.patch | 27 ++++++++++++++++++++
15 3 files changed, 57 insertions(+)
16
17 diff --git a/dev-python/django-filter/Manifest b/dev-python/django-filter/Manifest
18 index d5150fd906a..1a587dada8f 100644
19 --- a/dev-python/django-filter/Manifest
20 +++ b/dev-python/django-filter/Manifest
21 @@ -1 +1,2 @@
22 DIST django-filter-2.4.0.tar.gz 146904 BLAKE2B 994b07c0f5e511451964f4f1e007ff9906975600d0bc8a02dcbeb86f91bf906490ca394ca95c23c57c1fff25a447f50a40054c0abfe385300f9db87645753978 SHA512 0584222b46add89aa7dd1dfd334fdd19903e0119d455a2c46644c501a66df224f9f51c33394d130bcd1fc0f28c6ede6d6853b9790430040ec7228f9a1dc55264
23 +DIST django-filter-21.1.tar.gz 154188 BLAKE2B f0ae3119a1dfa466e6630f7da44db1531172991b137fe9420ed533a7b3d4177f689f07fed115566854bd40e5e23f4e9f2f73be32188af2c067a81a95fbccc5a3 SHA512 df2b02bfa93874d9684a26394778203b827c6459ab8cc8c581677e6ccfeedf1323085f53fb52cfc3e0e0a3d27f86de655366bcd4be361502ce86e65b4a4e84d0
24
25 diff --git a/dev-python/django-filter/django-filter-21.1.ebuild b/dev-python/django-filter/django-filter-21.1.ebuild
26 new file mode 100644
27 index 00000000000..bf4e7366b1b
28 --- /dev/null
29 +++ b/dev-python/django-filter/django-filter-21.1.ebuild
30 @@ -0,0 +1,29 @@
31 +# Copyright 1999-2021 Gentoo Authors
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=8
35 +
36 +PYTHON_COMPAT=( python3_{8..10} )
37 +inherit distutils-r1
38 +
39 +DESCRIPTION="Django app allowing declarative dynamic QuerySet filtering from URL parameters"
40 +HOMEPAGE="https://github.com/carltongibson/django-filter"
41 +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
42 +
43 +LICENSE="BSD"
44 +SLOT="0"
45 +KEYWORDS="~amd64"
46 +IUSE="test"
47 +RESTRICT="!test? ( test )"
48 +
49 +RDEPEND=">=dev-python/django-1.11[${PYTHON_USEDEP}]"
50 +BDEPEND="test? ( ${RDEPEND} )"
51 +
52 +PATCHES=(
53 + "${FILESDIR}"/${P}-test-skipIf.patch
54 +)
55 +
56 +python_test() {
57 + local -x DJANGO_SETTINGS_MODULE=tests.settings
58 + django-admin test -v 2 || die
59 +}
60
61 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
62 new file mode 100644
63 index 00000000000..adaf8ba428d
64 --- /dev/null
65 +++ b/dev-python/django-filter/files/django-filter-21.1-test-skipIf.patch
66 @@ -0,0 +1,27 @@
67 +From db97686a9950cc1a372d27dfbb90b19ceece3f65 Mon Sep 17 00:00:00 2001
68 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o>
69 +Date: Fri, 24 Sep 2021 21:22:41 +0200
70 +Subject: [PATCH] Fix inverted skipIf for CrispyFormsCompatTests tests
71 +
72 +The test is being wrongly skipped when crispy_forms are installed
73 +rather than the other way around.
74 +---
75 + tests/rest_framework/test_filterset.py | 2 +-
76 + 1 file changed, 1 insertion(+), 1 deletion(-)
77 +
78 +diff --git a/tests/rest_framework/test_filterset.py b/tests/rest_framework/test_filterset.py
79 +index f8b5aae..b6a658d 100644
80 +--- a/tests/rest_framework/test_filterset.py
81 ++++ b/tests/rest_framework/test_filterset.py
82 +@@ -38,7 +38,7 @@ class FilterSetFilterForFieldTests(TestCase):
83 + self.assertEqual(result.extra['widget'], BooleanWidget)
84 +
85 +
86 +-@skipIf(is_crispy(), 'django_crispy_forms must be installed')
87 ++@skipIf(not is_crispy(), 'django_crispy_forms must be installed')
88 + @override_settings(INSTALLED_APPS=settings.INSTALLED_APPS + ('crispy_forms', ))
89 + class CrispyFormsCompatTests(TestCase):
90 +
91 +--
92 +2.33.0
93 +