diff --git a/rust2rpm/__main__.py b/rust2rpm/__main__.py index 52c1d75..a3e9411 100644 --- a/rust2rpm/__main__.py +++ b/rust2rpm/__main__.py @@ -239,6 +239,8 @@ def main(): help="Activate all available features") parser.add_argument("--dynamic-buildrequires", action="store_true", help="Use dynamic BuildRequires feature") + parser.add_argument("--no-dynamic-buildrequires", action="store_true", + help="Do not use dynamic BuildRequires feature") parser.add_argument("--suffix", action="store", help="Package suffix") parser.add_argument("crate", help="crates.io name\n" @@ -319,6 +321,9 @@ def main(): else: kwargs["pkg_release"] = "1%{?dist}" + if args.target == "fedora" and not args.no_dynamic_buildrequires: + args.dynamic_buildrequires = True + kwargs["generate_buildrequires"] = args.dynamic_buildrequires if args.target in {"opensuse", "fedora"}: