1 |
commit: 68a24f96d692888b024ae5ddc877b6f31d63f6ae |
2 |
Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Oct 8 18:54:15 2021 +0000 |
4 |
Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Oct 15 15:43:50 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=68a24f96 |
7 |
|
8 |
dev-python/adblock: EAPI7->8, tidy, add python3_10 |
9 |
|
10 |
Also: |
11 |
* fix install with USE=debug (library is in target/debug/) |
12 |
* skip installing /usr/lib*/libadblock.so as it's the same file |
13 |
as adblock.abi3.so and is only needed in python's site dir |
14 |
* add missing dev-python/toml test dependency |
15 |
* add licenses for used crates (needs both former options at |
16 |
once removing the use for ||) |
17 |
|
18 |
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org> |
19 |
|
20 |
dev-python/adblock/adblock-0.5.0.ebuild | 179 +++++++++++++++++--------------- |
21 |
1 file changed, 93 insertions(+), 86 deletions(-) |
22 |
|
23 |
diff --git a/dev-python/adblock/adblock-0.5.0.ebuild b/dev-python/adblock/adblock-0.5.0.ebuild |
24 |
index 5ef500a3655..d611b5ade79 100644 |
25 |
--- a/dev-python/adblock/adblock-0.5.0.ebuild |
26 |
+++ b/dev-python/adblock/adblock-0.5.0.ebuild |
27 |
@@ -1,113 +1,120 @@ |
28 |
# Copyright 2021 Gentoo Authors |
29 |
# Distributed under the terms of the GNU General Public License v2 |
30 |
|
31 |
-EAPI=7 |
32 |
+EAPI=8 |
33 |
|
34 |
CRATES=" |
35 |
-adblock-0.3.13 |
36 |
-addr-0.14.0 |
37 |
-adler-1.0.2 |
38 |
-aho-corasick-0.7.18 |
39 |
-autocfg-1.0.1 |
40 |
-base64-0.13.0 |
41 |
-bitflags-1.2.1 |
42 |
-byteorder-1.4.3 |
43 |
-cfg-if-1.0.0 |
44 |
-crc32fast-1.2.1 |
45 |
-ctor-0.1.20 |
46 |
-either-1.6.1 |
47 |
-flate2-1.0.20 |
48 |
-form_urlencoded-1.0.1 |
49 |
-ghost-0.1.2 |
50 |
-idna-0.2.2 |
51 |
-indoc-0.3.6 |
52 |
-indoc-impl-0.3.6 |
53 |
-instant-0.1.9 |
54 |
-inventory-0.1.10 |
55 |
-inventory-impl-0.1.10 |
56 |
-itertools-0.9.0 |
57 |
-libc-0.2.93 |
58 |
-lock_api-0.4.3 |
59 |
-matches-0.1.8 |
60 |
-memchr-2.4.0 |
61 |
-miniz_oxide-0.4.4 |
62 |
-num-traits-0.2.14 |
63 |
-once_cell-1.7.2 |
64 |
-parking_lot-0.11.1 |
65 |
-parking_lot_core-0.8.3 |
66 |
-paste-0.1.18 |
67 |
-paste-impl-0.1.18 |
68 |
-percent-encoding-2.1.0 |
69 |
-proc-macro-hack-0.5.19 |
70 |
-proc-macro2-1.0.26 |
71 |
-psl-2.0.18 |
72 |
-psl-types-2.0.7 |
73 |
-pyo3-0.13.2 |
74 |
-pyo3-macros-0.13.2 |
75 |
-pyo3-macros-backend-0.13.2 |
76 |
-quote-1.0.9 |
77 |
-redox_syscall-0.2.5 |
78 |
-regex-1.5.4 |
79 |
-regex-syntax-0.6.25 |
80 |
-rmp-0.8.10 |
81 |
-rmp-serde-0.13.7 |
82 |
-scopeguard-1.1.0 |
83 |
-seahash-3.0.7 |
84 |
-serde-1.0.125 |
85 |
-serde_derive-1.0.125 |
86 |
-smallvec-1.6.1 |
87 |
-syn-1.0.69 |
88 |
-tinyvec-1.2.0 |
89 |
-tinyvec_macros-0.1.0 |
90 |
-twoway-0.2.1 |
91 |
-unchecked-index-0.2.2 |
92 |
-unicode-bidi-0.3.5 |
93 |
-unicode-normalization-0.1.17 |
94 |
-unicode-xid-0.2.1 |
95 |
-unindent-0.1.7 |
96 |
-url-2.2.1 |
97 |
-winapi-0.3.9 |
98 |
-winapi-i686-pc-windows-gnu-0.4.0 |
99 |
-winapi-x86_64-pc-windows-gnu-0.4.0 |
100 |
-" |
101 |
-PYTHON_COMPAT=( python3_{8,9} ) |
102 |
- |
103 |
+ adblock-0.3.13 |
104 |
+ addr-0.14.0 |
105 |
+ adler-1.0.2 |
106 |
+ aho-corasick-0.7.18 |
107 |
+ autocfg-1.0.1 |
108 |
+ base64-0.13.0 |
109 |
+ bitflags-1.2.1 |
110 |
+ byteorder-1.4.3 |
111 |
+ cfg-if-1.0.0 |
112 |
+ crc32fast-1.2.1 |
113 |
+ ctor-0.1.20 |
114 |
+ either-1.6.1 |
115 |
+ flate2-1.0.20 |
116 |
+ form_urlencoded-1.0.1 |
117 |
+ ghost-0.1.2 |
118 |
+ idna-0.2.2 |
119 |
+ indoc-0.3.6 |
120 |
+ indoc-impl-0.3.6 |
121 |
+ instant-0.1.9 |
122 |
+ inventory-0.1.10 |
123 |
+ inventory-impl-0.1.10 |
124 |
+ itertools-0.9.0 |
125 |
+ libc-0.2.93 |
126 |
+ lock_api-0.4.3 |
127 |
+ matches-0.1.8 |
128 |
+ memchr-2.4.0 |
129 |
+ miniz_oxide-0.4.4 |
130 |
+ num-traits-0.2.14 |
131 |
+ once_cell-1.7.2 |
132 |
+ parking_lot-0.11.1 |
133 |
+ parking_lot_core-0.8.3 |
134 |
+ paste-0.1.18 |
135 |
+ paste-impl-0.1.18 |
136 |
+ percent-encoding-2.1.0 |
137 |
+ proc-macro-hack-0.5.19 |
138 |
+ proc-macro2-1.0.26 |
139 |
+ psl-2.0.18 |
140 |
+ psl-types-2.0.7 |
141 |
+ pyo3-0.13.2 |
142 |
+ pyo3-macros-0.13.2 |
143 |
+ pyo3-macros-backend-0.13.2 |
144 |
+ quote-1.0.9 |
145 |
+ redox_syscall-0.2.5 |
146 |
+ regex-1.5.4 |
147 |
+ regex-syntax-0.6.25 |
148 |
+ rmp-0.8.10 |
149 |
+ rmp-serde-0.13.7 |
150 |
+ scopeguard-1.1.0 |
151 |
+ seahash-3.0.7 |
152 |
+ serde-1.0.125 |
153 |
+ serde_derive-1.0.125 |
154 |
+ smallvec-1.6.1 |
155 |
+ syn-1.0.69 |
156 |
+ tinyvec-1.2.0 |
157 |
+ tinyvec_macros-0.1.0 |
158 |
+ twoway-0.2.1 |
159 |
+ unchecked-index-0.2.2 |
160 |
+ unicode-bidi-0.3.5 |
161 |
+ unicode-normalization-0.1.17 |
162 |
+ unicode-xid-0.2.1 |
163 |
+ unindent-0.1.7 |
164 |
+ url-2.2.1 |
165 |
+ winapi-0.3.9 |
166 |
+ winapi-i686-pc-windows-gnu-0.4.0 |
167 |
+ winapi-x86_64-pc-windows-gnu-0.4.0" |
168 |
+PYTHON_COMPAT=( python3_{8..10} ) |
169 |
inherit cargo python-r1 |
170 |
|
171 |
DESCRIPTION="Python wrapper for Brave's adblocking library, which is written in Rust" |
172 |
HOMEPAGE="https://github.com/ArniDagur/python-adblock" |
173 |
-SRC_URI="https://github.com/ArniDagur/python-adblock/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz |
174 |
- $(cargo_crate_uris ${CRATES})" |
175 |
+SRC_URI=" |
176 |
+ https://github.com/ArniDagur/python-adblock/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz |
177 |
+ $(cargo_crate_uris)" |
178 |
S="${WORKDIR}/python-${P}" |
179 |
|
180 |
-LICENSE="|| ( Apache-2.0 MIT )" |
181 |
+LICENSE="Apache-2.0 BSD MIT MPL-2.0" |
182 |
SLOT="0" |
183 |
KEYWORDS="~amd64" |
184 |
-IUSE="debug test" |
185 |
+IUSE="test" |
186 |
REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
187 |
RESTRICT="!test? ( test )" |
188 |
|
189 |
RDEPEND="${PYTHON_DEPS}" |
190 |
-DEPEND="${RDEPEND}" |
191 |
-BDEPEND="app-arch/unzip |
192 |
+BDEPEND=" |
193 |
+ ${PYTHON_DEPS} |
194 |
dev-util/maturin |
195 |
- test? ( dev-python/pytest[${PYTHON_USEDEP}] )" |
196 |
+ test? ( |
197 |
+ dev-python/pytest[${PYTHON_USEDEP}] |
198 |
+ dev-python/toml[${PYTHON_USEDEP}] |
199 |
+ )" |
200 |
|
201 |
-QA_FLAGS_IGNORED="usr/lib.*/libadblock.so |
202 |
- usr/lib/python3.*/site-packages/adblock/adblock.abi3.so" |
203 |
-QA_SONAME="${QA_FLAGS_IGNORED}" |
204 |
+QA_FLAGS_IGNORED="usr/lib/python3.*/site-packages/adblock/adblock.abi3.so" |
205 |
|
206 |
src_compile() { |
207 |
- maturin build $(usex debug "" --release) --no-sdist || die |
208 |
- unzip "target/wheels/${P}-*.whl" adblock/adblock.abi3.so || die |
209 |
-} |
210 |
+ maturin build $(usev !debug --release) --no-sdist || die |
211 |
|
212 |
-src_install() { |
213 |
- python_foreach_impl python_domodule adblock |
214 |
- dolib.so target/release/libadblock.so |
215 |
- dodoc CHANGELOG.md README.md |
216 |
+ mv target/$(usex debug{,} release)/libadblock.so \ |
217 |
+ adblock/adblock.abi3.so || die |
218 |
} |
219 |
|
220 |
src_test() { |
221 |
+ local EPYTEST_DESELECT=( |
222 |
+ # tests if python-3.10 >= 3.6, but results in 3.1 < 3.6 |
223 |
+ tests/test_metadata.py::test_required_python_version |
224 |
+ ) |
225 |
+ |
226 |
python_foreach_impl epytest |
227 |
} |
228 |
+ |
229 |
+src_install() { |
230 |
+ python_foreach_impl python_domodule adblock |
231 |
+ |
232 |
+ dodoc CHANGELOG.md README.md |
233 |
+} |