Initial import

Signed-off-by: Igor Raits <ignatenkobrain@fedoraproject.org>
epel9
Igor Raits 5 years ago
parent a4bf18094a
commit f22e71f0ea
No known key found for this signature in database
GPG Key ID: 695714BD1BBC5F4C

1
.gitignore vendored

@ -0,0 +1 @@
/pico-args-0.3.1.crate

@ -0,0 +1,41 @@
From 73eb2098180c460e24eeb575efc545bdc8efcf84 Mon Sep 17 00:00:00 2001
From: Evgeniy Reizner <razrfalcon@gmail.com>
Date: Thu, 20 Feb 2020 03:18:57 +0200
Subject: [PATCH] Ignore debug related tests in release mode.
Closes #9
---
tests/tests.rs | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tests/tests.rs b/tests/tests.rs
index 3ce69640caf7..bc4004344d72 100644
--- a/tests/tests.rs
+++ b/tests/tests.rs
@@ -49,6 +49,7 @@ fn invalid_flag_01() {
assert!(args.contains("v"));
}
+#[cfg(debug_assertions)]
#[test]
#[should_panic]
fn invalid_flag_02() {
@@ -56,6 +57,7 @@ fn invalid_flag_02() {
assert!(args.contains(["v", "--version"]));
}
+#[cfg(debug_assertions)]
#[test]
#[should_panic]
fn invalid_flag_03() {
@@ -63,6 +65,7 @@ fn invalid_flag_03() {
assert!(args.contains(["-v", "-version"]));
}
+#[cfg(debug_assertions)]
#[test]
#[should_panic]
fn invalid_flag_04() {
--
2.24.1

@ -0,0 +1,80 @@
# Generated by rust2rpm 13
%bcond_without check
%global debug_package %{nil}
%global crate pico-args
Name: rust-%{crate}
Version: 0.3.1
Release: 1%{?dist}
Summary: Ultra simple CLI arguments parser
# Upstream license specification: MIT
License: MIT
URL: https://crates.io/crates/pico-args
Source: %{crates_source}
# Some tests don't work in --release mode
# https://github.com/RazrFalcon/pico-args/issues/9
# https://github.com/RazrFalcon/pico-args/commit/73eb2098180c460e24eeb575efc545bdc8efcf84
Patch0001: 0001-Ignore-debug-related-tests-in-release-mode.patch
ExclusiveArch: %{rust_arches}
%if %{__cargo_skip_build}
BuildArch: noarch
%endif
BuildRequires: rust-packaging
%global _description %{expand:
Ultra simple CLI arguments parser.}
%description %{_description}
%package devel
Summary: %{summary}
BuildArch: noarch
%description devel %{_description}
This package contains library source intended for building other packages
which use "%{crate}" crate.
%files devel
%license LICENSE
%doc README.md CHANGELOG.md
%{cargo_registry}/%{crate}-%{version_no_tilde}/
%package -n %{name}+default-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+default-devel %{_description}
This package contains library source intended for building other packages
which use "default" feature of "%{crate}" crate.
%files -n %{name}+default-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
%prep
%autosetup -n %{crate}-%{version_no_tilde} -p1
%cargo_prep
%generate_buildrequires
%cargo_generate_buildrequires
%build
%cargo_build
%install
%cargo_install
%if %{with check}
%check
%cargo_test
%endif
%changelog
* Wed Feb 19 16:28:49 PST 2020 Josh Stone <jistone@redhat.com> - 0.3.1-1
- Initial package

@ -0,0 +1 @@
SHA512 (pico-args-0.3.1.crate) = a227cbe22bf8efe6fcdf5e8917d04c902ed31f0cdce3c431e1fef1c74f468daf2af599bb167036a0cc4c1a91a249d85068bab567de5f7cfbf2a1e1958c2b905d
Loading…
Cancel
Save