commit 277a87aee0e75843b2484c5e2043436378d392ec Author: Miro HronĨok Date: Wed Jan 11 12:24:24 2023 +0100 Initial import - Fixes: rhbz#2159772 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..86f4a9a --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/time-machine-*.tar.gz diff --git a/python-time-machine.spec b/python-time-machine.spec new file mode 100644 index 0000000..c1865dc --- /dev/null +++ b/python-time-machine.spec @@ -0,0 +1,54 @@ +Name: python-time-machine +Version: 2.9.0 +Release: %autorelease +Summary: Travel through time in your Python tests +License: MIT +URL: https://github.com/adamchainz/time-machine +Source: %{url}/archive/%{version}/time-machine-%{version}.tar.gz + +BuildRequires: gcc +BuildRequires: python3-devel + +%global _description %{expand: +A Python library that allows to travel in time and freeze it as well. +Includes a test-function decorator that sets time to an arbitrary value.} + +%description %_description + +%package -n python3-time-machine +Summary: %{summary} + +%description -n python3-time-machine %_description + + +%prep +%autosetup -p1 -n time-machine-%{version} +sed -i '/coverage/d' requirements/requirements.in + + +%generate_buildrequires +# tox uses a pinned version of requirements/requirements.in and also uses coverage +# so we bypass it. +# This also saves us one dependency cycle as tox uses time-machine for tests. +%pyproject_buildrequires requirements/requirements.in + + +%build +%pyproject_wheel + + +%install +%pyproject_install +%pyproject_save_files time_machine _time_machine + + +%check +%pytest -v + + +%files -n python3-time-machine -f %{pyproject_files} +%doc README.rst HISTORY.rst + + +%changelog +%autochangelog diff --git a/sources b/sources new file mode 100644 index 0000000..9d7515f --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (time-machine-2.9.0.tar.gz) = ecc780a72d279b49d026a8f3f89210cb4c90e02c5a517c08eadbabcb65216a24c603ace39afd76ea1e6ccdef589d5997581d0db7477bb28fe4d1e0510daf17a0