%bcond_without tests %global pypi_name cffconvert %global orig_name cff-converter-python %global _description %{expand: Implementation of Command-line program to validate and convert CITATION.cff files in Python.} Name: %{pypi_name} Version: 2.0.0 Release: 1%{?dist} Summary: Command line program to validate and convert CITATION.cff files License: ASL 2.0 URL: https://github.com/citation-file-format/%{orig_name} Source0: %{url}/archive/%{version}/%{orig_name}-%{version}.tar.gz BuildArch: noarch BuildRequires: python3-devel BuildRequires: help2man %if %{with tests} BuildRequires: python3dist(pytest) %endif %description -n %{pypi_name} %_description %prep %autosetup -n %{orig_name}-%{version} # https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters sed -r -i 's/--[^[:blank:]]*\bcov\b[^[:blank:]]*//' setup.cfg %generate_buildrequires %pyproject_buildrequires -x gcloud %build %pyproject_wheel %install %pyproject_install %pyproject_save_files cffconvert # man page install -d '%{buildroot}%{_mandir}/man1' env PATH="${PATH}:%{buildroot}%{_bindir}" \ PYTHONPATH='%{buildroot}%{python3_sitelib}' \ help2man --no-info '%{pypi_name}' \ --output='%{buildroot}%{_mandir}/man1/%{pypi_name}.1' # a minor portion of tests is failing %check %if %{with tests} %pytest -k 'not test_local_cff_file_does_not_exist and not test_printing_of_version and not ris and not bibtex and not stdout' %endif %files -n cffconvert -f %{pyproject_files} %license LICENSE %doc docs/ README.md CHANGELOG.md CITATION.cff CONTRIBUTING.md %{_bindir}/%{pypi_name} %{_mandir}/man1/%{pypi_name}.1* %changelog * Mon May 9 2022 Iztok Fister Jr. - 2.0.0-1 - Initial package