1 |
commit: 61b71a4de793517b9ee111a2d62129344118b6e2 |
2 |
Author: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Mar 15 18:29:27 2023 +0000 |
4 |
Commit: Arthur Zamarin <arthurzam <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Mar 15 18:33:53 2023 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=61b71a4d |
7 |
|
8 |
dev-python/django-cacheops: add 7.0 |
9 |
|
10 |
Signed-off-by: Arthur Zamarin <arthurzam <AT> gentoo.org> |
11 |
|
12 |
dev-python/django-cacheops/Manifest | 1 + |
13 |
.../django-cacheops/django-cacheops-7.0.ebuild | 72 ++++++++++++++++++++++ |
14 |
2 files changed, 73 insertions(+) |
15 |
|
16 |
diff --git a/dev-python/django-cacheops/Manifest b/dev-python/django-cacheops/Manifest |
17 |
index f8370f4d98c3..6b493af5a502 100644 |
18 |
--- a/dev-python/django-cacheops/Manifest |
19 |
+++ b/dev-python/django-cacheops/Manifest |
20 |
@@ -1,2 +1,3 @@ |
21 |
DIST django-cacheops-6.1.gh.tar.gz 52972 BLAKE2B bdcd045912100ebdfdfd9add23b0df634b029cc2ffe41c351176e327f1e21c90457cfca9e45348dddce60e39fee5c431428ff7f2c954194e4c06c8bc09d78945 SHA512 43dcd4f302afee1acf73125aae7c2e2eece560cc6f07f3374391ac54e0438fd59b80a24e65f52bd7aa4978fd8a428939a8d607c7aa4b25f47d68373cfc12772f |
22 |
DIST django-cacheops-6.2.gh.tar.gz 55279 BLAKE2B 9fa05d6701e0cb705a012714f4ef5b98e6a56fe916033567e71256f2425ef844451d98cf7b2dd78023a680e19eab52b2f8cc4100ccf037e3d2e33f814eb47ead SHA512 48e51de2fd13c16a97085b9c6e61833f6c8b0252a0ede9e8a4beaa973e509fe34731804830b0d80926c0ae0f75aef939b7b21368de7ac17053bb1c10c0a7d104 |
23 |
+DIST django-cacheops-7.0.gh.tar.gz 56009 BLAKE2B 7829c6308db163dce5e75170093107c5a9d7dc6c5caccdea55b81631f43664ddea767ce9320221abdfc9c52af6bea363a62b5e7e86e0afa54208fabf3baf431a SHA512 bae0005e377ab8d9f9dc6da50a845966affc75b57846eb432bd7090f20b644e1b7ce9e963a9b6e84270661c23a51c7cf0436fc8448d34fb3c2f3f3245f98f7f7 |
24 |
|
25 |
diff --git a/dev-python/django-cacheops/django-cacheops-7.0.ebuild b/dev-python/django-cacheops/django-cacheops-7.0.ebuild |
26 |
new file mode 100644 |
27 |
index 000000000000..f7d4a8683991 |
28 |
--- /dev/null |
29 |
+++ b/dev-python/django-cacheops/django-cacheops-7.0.ebuild |
30 |
@@ -0,0 +1,72 @@ |
31 |
+# Copyright 1999-2023 Gentoo Authors |
32 |
+# Distributed under the terms of the GNU General Public License v2 |
33 |
+ |
34 |
+EAPI=8 |
35 |
+ |
36 |
+DISTUTILS_USE_PEP517=setuptools |
37 |
+PYTHON_COMPAT=( python3_{9..11} ) |
38 |
+ |
39 |
+inherit distutils-r1 |
40 |
+ |
41 |
+DESCRIPTION="ORM cache with automatic granular event-driven invalidation for Django" |
42 |
+HOMEPAGE=" |
43 |
+ https://github.com/Suor/django-cacheops/ |
44 |
+ https://pypi.org/project/django-cacheops/ |
45 |
+" |
46 |
+SRC_URI=" |
47 |
+ https://github.com/Suor/django-cacheops/archive/${PV}.tar.gz |
48 |
+ -> ${P}.gh.tar.gz |
49 |
+" |
50 |
+ |
51 |
+LICENSE="BSD" |
52 |
+SLOT="0" |
53 |
+KEYWORDS="~amd64" |
54 |
+IUSE="test" |
55 |
+RESTRICT="!test? ( test )" |
56 |
+ |
57 |
+RDEPEND=" |
58 |
+ >=dev-python/django-3.2[${PYTHON_USEDEP}] |
59 |
+ >=dev-python/redis-2.9.1[${PYTHON_USEDEP}] |
60 |
+ >=dev-python/funcy-1.8[${PYTHON_USEDEP}] |
61 |
+ >=dev-python/six-1.4.0[${PYTHON_USEDEP}] |
62 |
+" |
63 |
+BDEPEND=" |
64 |
+ test? ( |
65 |
+ ${RDEPEND} |
66 |
+ dev-db/redis |
67 |
+ dev-python/dill[${PYTHON_USEDEP}] |
68 |
+ dev-python/mock[${PYTHON_USEDEP}] |
69 |
+ ) |
70 |
+" |
71 |
+ |
72 |
+src_prepare() { |
73 |
+ # Remove test dependent on unpackaged before_after |
74 |
+ sed -e 's/test_lock/_&/' -i tests/test_extras.py || die |
75 |
+ distutils-r1_src_prepare |
76 |
+} |
77 |
+ |
78 |
+python_test() { |
79 |
+ local -x DJANGO_SETTINGS_MODULE=tests.settings |
80 |
+ local -x PYTHONPATH=. |
81 |
+ django-admin test -v 2 || die |
82 |
+} |
83 |
+ |
84 |
+src_test() { |
85 |
+ local redis_pid="${T}"/redis.pid |
86 |
+ local redis_port=6379 |
87 |
+ |
88 |
+ einfo "Spawning Redis" |
89 |
+ einfo "NOTE: Port ${redis_port} must be free" |
90 |
+ "${EPREFIX}"/usr/sbin/redis-server - <<-EOF || die |
91 |
+ daemonize yes |
92 |
+ pidfile ${redis_pid} |
93 |
+ port ${redis_port} |
94 |
+ bind 127.0.0.1 |
95 |
+ EOF |
96 |
+ |
97 |
+ # Run the tests |
98 |
+ distutils-r1_src_test |
99 |
+ |
100 |
+ # Clean up afterwards |
101 |
+ kill "$(<"${redis_pid}")" || die |
102 |
+} |