3 %bcond_without tests # unit tests
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
7 Summary: FreezeGun: Let your Python 2 tests travel through time
8 Summary(pl.UTF-8): FreezeGun - umożliwienie testom Pythona 2 podróżowania w czasie
10 # keep 0.3.x here for python3 support
14 Group: Libraries/Python
15 #Source0Download: https://pypi.org/simple/freezegun/
16 Source0: https://files.pythonhosted.org/packages/source/f/freezegun/freezegun-%{version}.tar.gz
17 # Source0-md5: 20d32ddc33d79bf53b6029a265ed2fcc
18 URL: https://pypi.org/project/freezegun/
19 BuildRequires: rpm-pythonprov
20 BuildRequires: rpmbuild(macros) >= 1.714
22 BuildRequires: python-modules >= 1:2.7
23 BuildRequires: python-setuptools
25 BuildRequires: python-dateutil >= 2.1
26 BuildRequires: python-mock
27 BuildRequires: python-modules-sqlite
28 BuildRequires: python-pytest
29 BuildRequires: python-six
33 BuildRequires: python3-modules >= 1:3.5
34 BuildRequires: python3-setuptools
36 BuildRequires: python3-dateutil >= 2.1
37 BuildRequires: python3-pytest
38 BuildRequires: python3-six
41 Requires: python-modules >= 1:2.7
43 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46 FreezeGun is a library that allows your Python tests to travel through
47 time by mocking the datetime module.
49 %description -l pl.UTF-8
50 FreezeGun to biblioteka pozwalająca testom w Pythonie podróżowanie w
51 czasie dzięki atrapie modułu datetime.
53 %package -n python3-freezegun
54 Summary: FreezeGun: Let your Python 3 tests travel through time
55 Summary(pl.UTF-8): FreezeGun - umożliwienie testom Pythona 3 podróżowania w czasie
56 Group: Libraries/Python
57 Requires: python3-modules >= 1:3.5
59 %description -n python3-freezegun
60 FreezeGun is a library that allows your Python tests to travel through
61 time by mocking the datetime module.
63 %description -n python3-freezegun -l pl.UTF-8
64 FreezeGun to biblioteka pozwalająca testom w Pythonie podróżowanie w
65 czasie dzięki atrapie modułu datetime.
68 %setup -q -n freezegun-%{version}
75 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
76 %{__python} -m pytest tests
84 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
85 %{__python3} -m pytest tests
90 rm -rf $RPM_BUILD_ROOT
103 rm -rf $RPM_BUILD_ROOT
107 %defattr(644,root,root,755)
108 %doc AUTHORS.rst CHANGELOG README.rst
109 %{py_sitescriptdir}/freezegun
110 %{py_sitescriptdir}/freezegun-%{version}-py*.egg-info
114 %files -n python3-freezegun
115 %defattr(644,root,root,755)
116 %doc AUTHORS.rst CHANGELOG README.rst
117 %{py3_sitescriptdir}/freezegun
118 %{py3_sitescriptdir}/freezegun-%{version}-py*.egg-info