commit: d9bb1030383d18e2a2cbb5f1ec07d049b922a9aa
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 7 17:20:26 2024 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Jul 7 17:23:05 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d9bb1030
dev-python/rustworkx: Enable py3.13
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/rustworkx/rustworkx-0.15.1-r1.ebuild | 164 ++++++++++++++++++++++++
1 file changed, 164 insertions(+)
diff --git a/dev-python/rustworkx/rustworkx-0.15.1-r1.ebuild
b/dev-python/rustworkx/rustworkx-0.15.1-r1.ebuild
new file mode 100644
index 000000000000..7cc5dad7a8b2
--- /dev/null
+++ b/dev-python/rustworkx/rustworkx-0.15.1-r1.ebuild
@@ -0,0 +1,164 @@
+# Copyright 2022-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_EXT=1
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..12} )
+
+CRATES="
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]+wasi-snapshot-preview1
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+ [email protected]
+"
+
+inherit cargo distutils-r1
+
+DESCRIPTION="A high performance Python graph library implemented in Rust"
+HOMEPAGE="
+ https://github.com/Qiskit/rustworkx/
+ https://pypi.org/project/rustworkx/
+"
+SRC_URI="
+ https://github.com/Qiskit/rustworkx/archive/${PV}.tar.gz
+ -> ${P}.gh.tar.gz
+ ${CARGO_CRATE_URIS}
+"
+
+LICENSE="Apache-2.0"
+# Dependent crate licenses
+LICENSE+="
+ Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD-2 MIT
+ Unicode-DFS-2016
+ || ( LGPL-3+ MPL-2.0 )
+"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND="
+ >=dev-python/numpy-1.16.0[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ dev-python/setuptools-rust[${PYTHON_USEDEP}]
+ test? (
+ dev-python/fixtures[${PYTHON_USEDEP}]
+ dev-python/graphviz[${PYTHON_USEDEP}]
+ >=dev-python/networkx-2.5[${PYTHON_USEDEP}]
+ dev-python/stestr[${PYTHON_USEDEP}]
+ >=dev-python/testtools-2.5.0[${PYTHON_USEDEP}]
+ media-gfx/graphviz[gts]
+ )
+"
+
+# Libraries built with rust do not use CFLAGS and LDFLAGS.
+QA_FLAGS_IGNORED="usr/lib.*/py.*/site-packages/rustworkx/rustworkx.*\\.so"
+
+EPYTEST_XDIST=1
+distutils_enable_tests pytest
+
+src_prepare() {
+ distutils-r1_src_prepare
+
+ # force unstable ABI to workaround stable ABI crash in py3.13
+ # https://github.com/PyO3/pyo3/issues/4311
+ sed -i -e 's:"abi3-py38",::' Cargo.toml || die
+ export UNSAFE_PYO3_SKIP_VERSION_CHECK=1
+}
+
+python_test() {
+ local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+ local EPYTEST_DESELECT=(
+ # TODO: hangs
+ tests/retworkx_backwards_compat/visualization/test_mpl.py
+ tests/rustworkx_tests/visualization/test_mpl.py
+ )
+ rm -rf rustworkx || die
+ epytest
+}