commit:     dcf3c1be7704580e86a645100b82135cc615eb03
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Sun Nov 10 20:18:14 2024 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sun Nov 10 20:34:10 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dcf3c1be

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 <AT> gentoo.org>

 dev-python/dulwich/dulwich-0.22.5-r1.ebuild | 20 +++++++-------------
 1 file changed, 7 insertions(+), 13 deletions(-)

diff --git a/dev-python/dulwich/dulwich-0.22.5-r1.ebuild 
b/dev-python/dulwich/dulwich-0.22.5-r1.ebuild
index db1bb455ba7f..a237b8715cf7 100644
--- a/dev-python/dulwich/dulwich-0.22.5-r1.ebuild
+++ b/dev-python/dulwich/dulwich-0.22.5-r1.ebuild
@@ -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() {

Reply via email to