1 |
commit: 6f304b0a6d911510c647e880df2c5efc3c13323f |
2 |
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon May 31 23:51:24 2021 +0000 |
4 |
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jun 1 00:06:33 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6f304b0a |
7 |
|
8 |
dev-python/setuptools_rust: fix minor issues, sort some lines |
9 |
|
10 |
add a test check guard. |
11 |
since tests now use rust, remove stabilize-allarches |
12 |
|
13 |
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org> |
14 |
|
15 |
dev-python/setuptools_rust/metadata.xml | 1 - |
16 |
.../setuptools_rust/setuptools_rust-0.12.1.ebuild | 28 ++++++++++++---------- |
17 |
2 files changed, 16 insertions(+), 13 deletions(-) |
18 |
|
19 |
diff --git a/dev-python/setuptools_rust/metadata.xml b/dev-python/setuptools_rust/metadata.xml |
20 |
index ac7472cd842..96b8e38ac42 100644 |
21 |
--- a/dev-python/setuptools_rust/metadata.xml |
22 |
+++ b/dev-python/setuptools_rust/metadata.xml |
23 |
@@ -13,5 +13,4 @@ |
24 |
<remote-id type="pypi">setuptools_rust</remote-id> |
25 |
<remote-id type="github">PyO3/setuptools-rust</remote-id> |
26 |
</upstream> |
27 |
- <stabilize-allarches/> |
28 |
</pkgmetadata> |
29 |
|
30 |
diff --git a/dev-python/setuptools_rust/setuptools_rust-0.12.1.ebuild b/dev-python/setuptools_rust/setuptools_rust-0.12.1.ebuild |
31 |
index b3377af5ff8..3be9c6d5540 100644 |
32 |
--- a/dev-python/setuptools_rust/setuptools_rust-0.12.1.ebuild |
33 |
+++ b/dev-python/setuptools_rust/setuptools_rust-0.12.1.ebuild |
34 |
@@ -3,18 +3,14 @@ |
35 |
|
36 |
EAPI=7 |
37 |
|
38 |
-PYTHON_COMPAT=( python3_{7..10} ) |
39 |
-DISTUTILS_USE_SETUPTOOLS=rdepend |
40 |
-DISTUTILS_IN_SOURCE_BUILD=1 |
41 |
- |
42 |
CARGO_OPTIONAL=yes |
43 |
+DISTUTILS_IN_SOURCE_BUILD=1 |
44 |
+DISTUTILS_USE_SETUPTOOLS=rdepend |
45 |
+PYTHON_COMPAT=( python3_{7..10} ) |
46 |
|
47 |
inherit distutils-r1 cargo |
48 |
|
49 |
-MY_PN="${PN/_/-}" |
50 |
-MY_P="${MY_PN}-${PV}" |
51 |
- |
52 |
-TEST_CRATES=" |
53 |
+CRATES=" |
54 |
bitflags-1.2.1 |
55 |
byteorder-1.3.4 |
56 |
cfg-if-0.1.10 |
57 |
@@ -93,10 +89,13 @@ winapi-i686-pc-windows-gnu-0.4.0 |
58 |
winapi-x86_64-pc-windows-gnu-0.4.0 |
59 |
" |
60 |
|
61 |
+MY_PN="${PN/_/-}" |
62 |
+MY_P="${MY_PN}-${PV}" |
63 |
+ |
64 |
DESCRIPTION="a plugin for setuptools to build Rust Python extensions" |
65 |
HOMEPAGE="https://github.com/PyO3/setuptools-rust" |
66 |
SRC_URI="mirror://pypi/${PN::1}/${MY_PN}/${MY_P}.tar.gz |
67 |
- test? ( $(cargo_crate_uris ${TEST_CRATES}) )" |
68 |
+ test? ( $(cargo_crate_uris ${CRATES}) )" |
69 |
|
70 |
LICENSE="MIT" |
71 |
SLOT="0" |
72 |
@@ -106,15 +105,15 @@ IUSE="test" |
73 |
RESTRICT="!test? ( test )" |
74 |
|
75 |
RDEPEND=" |
76 |
- >=virtual/rust-1.41.0 |
77 |
+ virtual/rust |
78 |
dev-python/semantic_version[${PYTHON_USEDEP}] |
79 |
dev-python/toml[${PYTHON_USEDEP}] |
80 |
dev-python/typing-extensions[${PYTHON_USEDEP}] |
81 |
" |
82 |
BDEPEND=" |
83 |
- ${RDEPEND} |
84 |
dev-python/setuptools_scm[${PYTHON_USEDEP}] |
85 |
test? ( |
86 |
+ ${RDEPEND} |
87 |
dev-python/pytest[${PYTHON_USEDEP}] |
88 |
dev-python/beautifulsoup:4[${PYTHON_USEDEP}] |
89 |
dev-python/lxml[${PYTHON_USEDEP}] |
90 |
@@ -129,9 +128,14 @@ src_unpack() { |
91 |
} |
92 |
|
93 |
python_test() { |
94 |
+ # we really really want this test. |
95 |
+ [[ ${PV} == 0.12.1 ]] || die "${FUNCNAME}: check if rust_with_cffi test can be enabled" |
96 |
+ |
97 |
distutils_install_for_testing |
98 |
|
99 |
- # rust_with_cffi - needs a different version of pyo3 |
100 |
+ # rust_with_cffi - needs a git version of pyo3 for this version |
101 |
+ # but next version should be ok to enable rust_with_cffi test |
102 |
+ # https://github.com/PyO3/setuptools-rust/commit/21fc0105dc7ba9b3bfdce1530a80190c01dff560#diff-a3f14f562689def4c1df269f3e37bafcf6036a58798d825b8a58438cb479600e |
103 |
local examples=(html-py-ever tomlgen namespace_package) |
104 |
for example_dir in ${examples[@]}; do |
105 |
pushd examples/${example_dir} || die |