No description
Find a file
Zbigniew Jędrzejewski-Szmek afbee03f26 Suppress tracebacks for "expected" errors
We shouldn't crash when network communication fails, or when a subprocess fails.
The traceback is unsightly, and causes bug reports to be files. Let's just print
the error.

$ PYTHONPATH=$HOME/python/rust2rpm python -m rust2rpm ./asdfasdf.asdf
error: the manifest-path must be a path to a Cargo.toml file
Subcommand failed with code 101: cargo read-manifest --manifest-path=./asdfasdf.asdf
$ PYTHONPATH=$HOME/python/rust2rpm python -m rust2rpm asdfasdf
Failed to download metadata: 404 Client Error: Not Found for url: https://crates.io/api/v1/crates/asdfasdf/versions

Fixes #145.

(This does the relatively easy thing of printing the original message. In
principle we could try to figure out what the exact error was and print uniform
error messages. But that'd be quite a lot of work, and fairly brittle, because
we'd need to cover all possible errors. So let's do this thing which should
be good enough in 95% of cases.)
2021-10-12 12:47:57 +00:00
data Parse features with + in their name 2021-02-01 13:56:37 +01:00
rust2rpm Suppress tracebacks for "expected" errors 2021-10-12 12:47:57 +00:00
tools fedora-helper: Use f35 as a base for license generation 2021-03-07 21:40:31 +01:00
.gitignore
LICENSE
MANIFEST.in Translate SPDX licenses to Fedora license tags, warn about "/" 2018-08-16 16:16:02 +02:00
README.md rust2rpm: allow removing unwanted features 2020-11-13 11:04:27 +01:00
requirements.txt metadata: replace semantic-version with a custom parser 2019-10-28 11:19:46 +01:00
setup.py metadata: replace semantic-version with a custom parser 2019-10-28 11:19:46 +01:00
test.py Add hyphens to underscores tests 2021-10-10 14:30:07 +02:00
tox.ini Add python 3.8 and 3.9 to tox.ini 2021-10-10 15:33:48 +02:00

rust2rpm

Convert Rust crates to RPM.

.rust2rpm.conf

You can place configuration file which is used as source for additional information for spec generation.

Some simple example would be better than many words ;)

[DEFAULT]
unwanted-features =
  compiler_builtins
  rustc-dep-of-std
buildrequires =
  pkgconfig(foo) >= 1.2.3
lib.requires =
  pkgconfig(foo) >= 1.2.3

[fedora]
bin.requires =
  findutils
buildrequires =
lib.requires =
lib+default.requires =
  pkgconfig(bar) >= 2.0.0