Blob Blame History Raw
%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:        5%{?dist}
Summary:        Command line program to validate and convert CITATION.cff files

License:        ASL 2.0
URL:  {orig_name}
Source0:        %{url}/archive/%{version}/%{orig_name}-%{version}.tar.gz

BuildArch:      noarch

# Allow jsonschema 4.x
Patch:          %{url}/pull/277.patch

BuildRequires:  python3-devel
BuildRequires:  help2man

%if %{with tests}
BuildRequires:  python3dist(pytest)

%description -n %{pypi_name} %_description

%autosetup -n %{orig_name}-%{version}

sed -r -i 's/--[^[:blank:]]*\bcov\b[^[:blank:]]*//' setup.cfg

%pyproject_buildrequires -x gcloud


%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}' \

# a minor portion of tests is failing
%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'

%files -n cffconvert -f %{pyproject_files}
%license LICENSE
%doc docs/ CITATION.cff

* Wed Jan 18 2023 Fedora Release Engineering <> - 2.0.0-5
- Rebuilt for

* Wed Jul 20 2022 Fedora Release Engineering <> - 2.0.0-4
- Rebuilt for

* Tue Jun 28 2022 Benjamin A. Beasley <> - 2.0.0-3
- Allow jsonschema 4.x (fix RHBZ#2101851)

* Tue Jun 14 2022 Python Maint <> - 2.0.0-2
- Rebuilt for Python 3.11

* Mon May 9 2022 Iztok Fister Jr. <iztokf AT fedoraproject DOT org> - 2.0.0-1
- Initial package