dev-python/dulwich-0.22.5-r1: drop hack, fix install without Rust

- drop previous rust-extension hack, eschwartz fixed this upstream
- avoid requiring Rust to be installed (which defeats the purpose of
  native-extensions USE-flag)

Signed-off-by: Fabian Groffen <grobian@gentoo.org>
This commit is contained in:
Fabian Groffen
2024-11-10 21:18:14 +01:00
parent 37b4f51031
commit dcf3c1be77

View File

@@ -74,21 +74,15 @@ distutils_enable_sphinx docs
QA_FLAGS_IGNORED="usr/lib.*/py.*/site-packages/dulwich/_.*.so"
src_unpack() {
cargo_src_unpack
pkg_setup() {
# avoid rust_pkg_setup which will die when there's no Rust found
if use native-extensions ; then
rust_pkg_setup # implicitly inherited through cargo
fi
}
src_prepare() {
default
if use !native-extensions; then
# avoid hard dep on rust via setuptools_rust
# https://github.com/jelmer/dulwich/issues/1405
sed -i \
-e '/from setuptools_rust/d' \
-e '/^rust_extensions = \[/,/^\]/d' \
setup.py || die
fi
src_unpack() {
cargo_src_unpack
}
python_compile() {