Hello Rust folks,
I see that all Rust crate packages require rust-packaging which in turn
requires python3-rust2rpm. That brings in:
- Python (obviously)
- python-jinja2
- python-requests
- python-tqdm
I always forget about this when I try to do some impact checks in Copr.
Currently, I am rebuilding all (transitive) build-dependents of
python-markupsafe in Fedora 35 and 36 due to a requested update. This includes
~2k rust packages that could probably be skipped, becasue markupsafe is
required by jinja2.
Do all rust packages indeed need all 3 listed Python libs on runtime?
As far as I understand, Python is used in the dependency generators trough the
cargo-inspector entry-point. So, let's live with that. jinja2, requests and
tqdm all seem to only by imported from the rust2rpm entrypoint (rust2rpm.__main__).
Can we please get rid of this dependency? It could be done on several levels:
1) upstream pyp2rpm, either or:
a) split the project into inspector, rust2rpm and common
-- I consider this tedious
b) make rust2rpm CLI a Python extra
-- I consider this bad UX, since the upstream project *is rust2rpm*
2) downstream rust-pacakging, all of the following:
- move crate-inspector bits to rust-pacakging
- stop requiring python3-rust2rpm from rust-pacakging
- use modern Python macros to install the entry_point via pip
(this is needed to be able to run ti without the metadata installed)
I have a proof of concept for (2) but it requires some small adjustment
upstream -- the inspector module must not import form __main__ (that is very
bad habit):
https://src.fedoraproject.org/rpms/rust-packaging/pull-request/3
WDYT?
--
Miro Hrončok
--
Phone: +420777974800
IRC: mhroncok