<blockquote>
<p>I'd be happy to. Do you have a pointer to where I should start?</p>
</blockquote>
<p>Sure, <a href="https://pagure.io/fedora-rust/rust2rpm" rel="nofollow">https://pagure.io/fedora-rust/rust2rpm</a>.</p>
<ol>
<li>We parse package name for generators</li>
</ol>
<pre><code>%__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}}
</code></pre>
<ol start="2">
<li>Dependency generator can generate Requires/Provides just for specific feature (extras in Python)</li>
</ol>
<hr>
<p>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 <code>%_python_all_extras_in_main</code> 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.</p>
<hr>
<pre><code>❯ 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
</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/rpm-software-management/rpm/pull/1014?email_source=notifications&email_token=ADLPZUYAPS6AIA5EQ34EJ2DRAZXIFA5CNFSM4KJVWM5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKRPVKQ#issuecomment-581106346">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ADLPZU76LTLU56F6FGXAJBDRAZXIFANCNFSM4KJVWM5A">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ADLPZU7ERGE4YBGQ2G3NFA3RAZXIFA5CNFSM4KJVWM5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKRPVKQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/rpm-software-management/rpm/pull/1014?email_source=notifications\u0026email_token=ADLPZUYAPS6AIA5EQ34EJ2DRAZXIFA5CNFSM4KJVWM5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKRPVKQ#issuecomment-581106346",
"url": "https://github.com/rpm-software-management/rpm/pull/1014?email_source=notifications\u0026email_token=ADLPZUYAPS6AIA5EQ34EJ2DRAZXIFA5CNFSM4KJVWM5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKRPVKQ#issuecomment-581106346",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>