544fe90
%bcond_without check
544fe90
544fe90
Name:           cargo2rpm
d69036d
Version:        0.1.16
544fe90
Release:        %autorelease
544fe90
Summary:        Translation layer between cargo and RPM
544fe90
License:        MIT
544fe90
544fe90
URL:            https://pagure.io/fedora-rust/cargo2rpm
544fe90
Source:         %{url}/archive/%{version}/cargo2rpm-%{version}.tar.gz
544fe90
544fe90
BuildArch:      noarch
544fe90
544fe90
BuildRequires:  python3-devel
e4e1529
%if %{with check}
e4e1529
BuildRequires:  %{py3_dist pytest}
e4e1529
%endif
544fe90
544fe90
Requires:       cargo
544fe90
544fe90
%description
544fe90
cargo2rpm implements a translation layer between cargo and RPM. It
544fe90
provides a CLI interface (for implementing RPM macros and generators)
544fe90
and a Python API (which rust2rpm is built upon).
544fe90
544fe90
%prep
5924222
%autosetup -p1
544fe90
544fe90
%generate_buildrequires
e4e1529
%pyproject_buildrequires
544fe90
544fe90
%build
544fe90
%pyproject_wheel
544fe90
544fe90
%install
544fe90
%pyproject_install
5924222
%pyproject_save_files cargo2rpm
544fe90
544fe90
%check
5924222
%pyproject_check_import
544fe90
%if %{with check}
e4e1529
%pytest
544fe90
%endif
544fe90
5924222
%files -f %{pyproject_files}
544fe90
%doc README.md
544fe90
%doc CHANGELOG.md
544fe90
%{_bindir}/cargo2rpm
544fe90
544fe90
%changelog
544fe90
%autochangelog