[Rpm-maint] [rpm-software-management/rpm] scripts/pythondistdeps: Print Provides-Extra entries for Python packa… (#1014)

Igor Gnatenko notifications at github.com
Sun Feb 2 07:15:14 UTC 2020


> I'd be happy to. Do you have a pointer to where I should start?

Sure, https://pagure.io/fedora-rust/rust2rpm.

1. We parse package name for generators

```
%__cargo_provides  %{_bindir}/cargo-inspector --provides --features=%{__cargo_feature_from_name -n %{name}}
%__cargo_requires  %{_bindir}/cargo-inspector --requires --features=%{__cargo_feature_from_name -n %{name}}
```

2. Dependency generator can generate Requires/Provides just for specific feature (extras in Python)

---

We just changed all our packages to be this scheme, I think for python it might not be desired, so we might want to create macro `%_python_all_extras_in_main` or something similar which would generate all extras provides/requires from the main package. And if you change it to 0, then it would do same as Rust one does.

---

```
❯ for x in '' '+default' '+indexmap'; echo -e "---\ntoml$x\n\nPROVIDES:"; sudo dnf -q repoquery --provides rust-toml{$x}-devel; echo "REQUIRES:"; sudo dnf -q repoquery --requires rust-toml{$x}-devel; end
---
toml

PROVIDES:
crate(toml) = 0.5.6
rust-toml-devel = 0.5.6-1.fc32
REQUIRES:
(crate(serde/default) >= 1.0.97 with crate(serde/default) < 2.0.0)
cargo
---
toml+default

PROVIDES:
crate(toml/default) = 0.5.6
rust-toml+default-devel = 0.5.6-1.fc32
REQUIRES:
cargo
crate(toml) = 0.5.6
---
toml+indexmap

PROVIDES:
crate(toml/indexmap) = 0.5.6
rust-toml+indexmap-devel = 0.5.6-1.fc32
REQUIRES:
(crate(indexmap/default) >= 1.0.0 with crate(indexmap/default) < 2.0.0)
cargo
crate(toml) = 0.5.6
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1014#issuecomment-581106346
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20200201/8fd3dd0c/attachment-0001.html>


More information about the Rpm-maint mailing list