Blame SPECS/python-time-machine.spec

353e2e
Name:           python-time-machine
353e2e
Version:        2.16.0
353e2e
Release:        %autorelease
353e2e
Summary:        Travel through time in your Python tests
353e2e
License:        MIT
353e2e
URL:            https://github.com/adamchainz/time-machine
353e2e
Source:         %{url}/archive/%{version}/time-machine-%{version}.tar.gz
353e2e
353e2e
BuildRequires:  gcc
353e2e
BuildRequires:  python3-devel
353e2e
353e2e
%global _description %{expand:
353e2e
A Python library that allows to travel in time and freeze it as well.
353e2e
Includes a test-function decorator that sets time to an arbitrary value.}
353e2e
353e2e
%description %_description
353e2e
353e2e
%package -n     python3-time-machine
353e2e
Summary:        %{summary}
353e2e
353e2e
%description -n python3-time-machine %_description
353e2e
353e2e
353e2e
%prep
353e2e
%autosetup -p1 -n time-machine-%{version}
353e2e
sed -i '/coverage/d' tests/requirements/requirements.in
353e2e
353e2e
353e2e
%generate_buildrequires
353e2e
# tox uses a pinned version of requirements/requirements.in and also uses coverage
353e2e
# so we bypass it.
353e2e
# This also saves us one dependency cycle as tox uses time-machine for tests.
353e2e
%pyproject_buildrequires tests/requirements/requirements.in
353e2e
353e2e
353e2e
%build
353e2e
%pyproject_wheel
353e2e
353e2e
353e2e
%install
353e2e
%pyproject_install
353e2e
%pyproject_save_files time_machine _time_machine
353e2e
353e2e
353e2e
%check
353e2e
%pytest -v
353e2e
353e2e
353e2e
%files -n python3-time-machine -f %{pyproject_files}
353e2e
%doc README.rst HISTORY.rst
353e2e
353e2e
353e2e
%changelog
353e2e
%autochangelog