Blob Blame History Raw
%bcond_without tests

Name:           python-rfc3339-validator
Version:        0.1.4
Release:        %autorelease
Summary:        Pure python RFC3339 validator

License:        MIT
Source0:        %{pypi_source rfc3339_validator}

BuildArch:      noarch

# Drop the pytest-runner test dependency and “ test” support
# Fixes:
# Consider dropping the pytest-runner test dependency
# See also the deprecation notice at
# This version of the patch has been modified to apply to the PyPI sdist, which
# does not contain requirements_dev.txt; see:
# Include files for tox testing in the sdist
Patch:          rfc3339-validator-0.1.4-drop-pytest-runner.patch

BuildRequires:  python3-devel

%if %{with tests}
# We use manual BR’s rather than generating dependencies from tox (which uses
# requirements_dev.txt) because dependencies there are pinned to exact versions
# and most of them are linter, coverage, and other tools that we would need to
# patch out.
BuildRequires:  python3dist(pytest)
BuildRequires:  python3dist(hypothesis)
BuildRequires:  python3dist(strict-rfc3339)

%global common_description %{expand:
A pure python RFC3339 validator.}

%description %{common_description}

%package -n python3-rfc3339-validator
Summary:        %{summary}

%description -n python3-rfc3339-validator %{common_description}

%autosetup -n rfc3339_validator-%{version}



%pyproject_save_files rfc3339_validator

%if %{with tests}

%files -n python3-rfc3339-validator -f %{pyproject_files}
%doc AUTHORS.rst
%doc HISTORY.rst