From ee2ab4af8bb696ab1e969f45534dd62f60e6b2bc Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Mar 19 2024 13:53:50 +0000 Subject: Fix and re-enable tests --- diff --git a/os_pipe-fix-metadata-auto.diff b/os_pipe-fix-metadata-auto.diff index 5e9174a..a02aaad 100644 --- a/os_pipe-fix-metadata-auto.diff +++ b/os_pipe-fix-metadata-auto.diff @@ -1,5 +1,5 @@ --- os_pipe-1.1.5/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ os_pipe-1.1.5/Cargo.toml 2023-12-31T16:32:25.209713+00:00 ++++ os_pipe-1.1.5/Cargo.toml 2024-03-08T21:40:08.657756+00:00 @@ -35,11 +35,3 @@ [target."cfg(not(windows))".dependencies.libc] version = "0.2.62" diff --git a/os_pipe-fix-metadata.diff b/os_pipe-fix-metadata.diff deleted file mode 100644 index ab83fb4..0000000 --- a/os_pipe-fix-metadata.diff +++ /dev/null @@ -1,10 +0,0 @@ ---- os_pipe-1.1.5/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ os_pipe-1.1.5/Cargo.toml 2023-12-31T16:32:29.819737+00:00 -@@ -25,6 +25,7 @@ - ] - license = "MIT" - repository = "https://github.com/oconnor663/os_pipe.rs" -+autobins = false - - [package.metadata.docs.rs] - features = ["io_safety"] diff --git a/rust-os_pipe.spec b/rust-os_pipe.spec index ec568a3..86463da 100644 --- a/rust-os_pipe.spec +++ b/rust-os_pipe.spec @@ -1,8 +1,10 @@ -# Generated by rust2rpm 25 -# * tests require building the example binaries -%bcond_with check +# Generated by rust2rpm 26 +%bcond_without check %global debug_package %{nil} +# prevent executables from being installed +%global cargo_install_bin 0 + %global crate os_pipe Name: rust-os_pipe @@ -15,11 +17,8 @@ URL: https://crates.io/crates/os_pipe Source: %{crates_source} # Automatically generated patch to strip dependencies and normalize metadata Patch: os_pipe-fix-metadata-auto.diff -# Manually created patch for downstream crate metadata changes -# * drop unwanted example binaries -Patch: os_pipe-fix-metadata.diff -BuildRequires: cargo-rpm-macros >= 24 +BuildRequires: cargo-rpm-macros >= 26 %global _description %{expand: A cross-platform library for opening OS pipes.} @@ -70,6 +69,9 @@ use the "io_safety" feature of the "%{crate}" crate. %generate_buildrequires %cargo_generate_buildrequires +%if %{with check} +echo '/usr/bin/python' +%endif %build %cargo_build diff --git a/rust2rpm.toml b/rust2rpm.toml index 25d1252..bb348e6 100644 --- a/rust2rpm.toml +++ b/rust2rpm.toml @@ -1,4 +1,6 @@ -[tests] -run = ["none"] -comments = ["tests require building the example binaries"] +[package] +cargo-install-bin = false + +[requires] +test = ["/usr/bin/python"]