Blame python-rfc3339-validator.spec

d4bd626
%bcond tests 1
4c01c84
4c01c84
Name:           python-rfc3339-validator
4c01c84
Version:        0.1.4
4c01c84
Release:        %autorelease
4c01c84
Summary:        Pure python RFC3339 validator
4c01c84
cfd0a3c
# SPDX
4c01c84
License:        MIT
4c01c84
URL:            https://github.com/naimetti/rfc3339-validator
fffe714
Source:         %{pypi_source rfc3339_validator}
4c01c84
4c01c84
BuildArch:      noarch
4c01c84
4c01c84
# Drop the pytest-runner test dependency and “setup.py test” support
4c01c84
# https://github.com/naimetti/rfc3339-validator/pull/7
4c01c84
#
4c01c84
# Fixes:
4c01c84
#
4c01c84
# Consider dropping the pytest-runner test dependency
4c01c84
# https://github.com/naimetti/rfc3339-validator/issues/6
4c01c84
#
4c01c84
# See also the deprecation notice at https://pypi.org/project/pytest-runner/.
4c01c84
#
4c01c84
# This version of the patch has been modified to apply to the PyPI sdist, which
4c01c84
# does not contain requirements_dev.txt; see:
4c01c84
#
4c01c84
# Include files for tox testing in the sdist
4c01c84
# https://github.com/naimetti/rfc3339-validator/pull/8
4c01c84
Patch:          rfc3339-validator-0.1.4-drop-pytest-runner.patch
4c01c84
4c01c84
BuildRequires:  python3-devel
4c01c84
4c01c84
%if %{with tests}
4c01c84
# We use manual BR’s rather than generating dependencies from tox (which uses
4c01c84
# requirements_dev.txt) because dependencies there are pinned to exact versions
4c01c84
# and most of them are linter, coverage, and other tools that we would need to
4c01c84
# patch out.
4c01c84
BuildRequires:  python3dist(pytest)
4c01c84
BuildRequires:  python3dist(hypothesis)
4c01c84
BuildRequires:  python3dist(strict-rfc3339)
4c01c84
%endif
4c01c84
4c01c84
%global common_description %{expand:
4c01c84
A pure python RFC3339 validator.}
4c01c84
4c01c84
%description %{common_description}
4c01c84
4c01c84
4c01c84
%package -n python3-rfc3339-validator
4c01c84
Summary:        %{summary}
4c01c84
4c01c84
%description -n python3-rfc3339-validator %{common_description}
4c01c84
4c01c84
4c01c84
%prep
4c01c84
%autosetup -n rfc3339_validator-%{version}
4c01c84
4c01c84
4c01c84
%generate_buildrequires
4c01c84
%pyproject_buildrequires
4c01c84
4c01c84
4c01c84
%build
4c01c84
%pyproject_wheel
4c01c84
4c01c84
4c01c84
%install
4c01c84
%pyproject_install
d7487d4
%pyproject_save_files -l rfc3339_validator
4c01c84
4c01c84
4c01c84
%check
4c01c84
%if %{with tests}
4c01c84
%pytest
4c01c84
%else
4c01c84
%pyproject_check_import
4c01c84
%endif
4c01c84
4c01c84
4c01c84
%files -n python3-rfc3339-validator -f %{pyproject_files}
4c01c84
%doc CONTRIBUTING.rst
4c01c84
%doc HISTORY.rst
4c01c84
%doc README.md
4c01c84
4c01c84
4c01c84
%changelog
4c01c84
%autochangelog