Blob Blame History Raw
# Generated by rust2rpm 24
%bcond_without check
%global debug_package %{nil}

%global crate python-pkginfo

Name:           rust-python-pkginfo
Version:        0.6.0
Release:        %autorelease
Summary:        Parse Python package metadata from sdist and bdists and etc

License:        MIT
URL:            https://crates.io/crates/python-pkginfo
Source:         %{crates_source}
# Manually created patch for downstream crate metadata changes
# * depend on the "xz2" crate directly instead of the "xz" alias
Patch:          python-pkginfo-fix-metadata.diff

BuildRequires:  rust-packaging >= 21

%global _description %{expand:
Parse Python package metadata from sdist and bdists and etc.}

%description %{_description}

%package        devel
Summary:        %{summary}
BuildArch:      noarch

%description    devel %{_description}

This package contains library source intended for building other packages which
use the "%{crate}" crate.

%files          devel
%license %{crate_instdir}/LICENSE
%doc %{crate_instdir}/README.md
%{crate_instdir}/

%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 the "default" feature of the "%{crate}" crate.

%files       -n %{name}+default-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+bzip2-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+bzip2-devel %{_description}

This package contains library source intended for building other packages which
use the "bzip2" feature of the "%{crate}" crate.

%files       -n %{name}+bzip2-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+deprecated-formats-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+deprecated-formats-devel %{_description}

This package contains library source intended for building other packages which
use the "deprecated-formats" feature of the "%{crate}" crate.

%files       -n %{name}+deprecated-formats-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+serde-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+serde-devel %{_description}

This package contains library source intended for building other packages which
use the "serde" feature of the "%{crate}" crate.

%files       -n %{name}+serde-devel
%ghost %{crate_instdir}/Cargo.toml

%package     -n %{name}+xz-devel
Summary:        %{summary}
BuildArch:      noarch

%description -n %{name}+xz-devel %{_description}

This package contains library source intended for building other packages which
use the "xz" feature of the "%{crate}" crate.

%files       -n %{name}+xz-devel
%ghost %{crate_instdir}/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
%autochangelog