add support for proc-macro kind
Closes: https://pagure.io/fedora-rust/rust2rpm/issue/19 Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
This commit is contained in:
parent
d4334a2ee7
commit
e834debc6a
2 changed files with 3 additions and 3 deletions
|
@ -4,8 +4,8 @@
|
|||
|
||||
%cargo_registry %{_usrsrc}/rust
|
||||
|
||||
%__cargo_is_lib() %{expand:%__cargo_inspector --target-kinds Cargo.toml | grep -q -F lib}
|
||||
%__cargo_is_bin() %{expand:%__cargo_inspector --target-kinds Cargo.toml | grep -q -F bin}
|
||||
%__cargo_is_lib() %__cargo_inspector --target-kinds Cargo.toml | grep -q -F "$(printf 'lib\\\nproc-macro')"
|
||||
%__cargo_is_bin() %__cargo_inspector --target-kinds Cargo.toml | grep -q -F bin
|
||||
|
||||
%cargo_prep (\
|
||||
set -eu \
|
||||
|
|
|
@ -221,7 +221,7 @@ def main():
|
|||
|
||||
kwargs = {}
|
||||
bins = [tgt for tgt in metadata.targets if tgt.kind == "bin"]
|
||||
libs = [tgt for tgt in metadata.targets if tgt.kind == "lib"]
|
||||
libs = [tgt for tgt in metadata.targets if tgt.kind in ("lib", "proc-macro")]
|
||||
is_bin = len(bins) > 0
|
||||
is_lib = len(libs) > 0
|
||||
if is_bin:
|
||||
|
|
Loading…
Reference in a new issue