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
13 Group: Libraries/Python
14 #Source0Download: https://pypi.org/simple/freezegun/
15 Source0: https://files.pythonhosted.org/packages/source/f/freezegun/freezegun-%{version}.tar.gz
16 # Source0-md5: 703b64446743c0d9f81ca9308e5097a0
17 Patch0: %{name}-mock.patch
18 URL: https://pypi.org/project/freezegun/
19 BuildRequires: rpm-pythonprov
20 BuildRequires: rpmbuild(macros) >= 1.714
22 BuildRequires: python-modules >= 1:2.6
23 BuildRequires: python-setuptools
25 BuildRequires: python-dateutil >= 2.1
26 BuildRequires: python-mock
27 BuildRequires: python-nose
28 BuildRequires: python-six
32 BuildRequires: python3-modules >= 1:3.3
33 BuildRequires: python3-setuptools
35 BuildRequires: python3-dateutil >= 2.1
36 BuildRequires: python3-nose
37 BuildRequires: python3-six
40 Requires: python-modules >= 1:2.6
42 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45 FreezeGun is a library that allows your Python tests to travel through
46 time by mocking the datetime module.
48 %description -l pl.UTF-8
49 FreezeGun to biblioteka pozwalająca testom w Pythonie podróżowanie w
50 czasie dzięki atrapie modułu datetime.
52 %package -n python3-freezegun
53 Summary: FreezeGun: Let your Python 3 tests travel through time
54 Summary(pl.UTF-8): FreezeGun - umożliwienie testom Pythona 3 podróżowania w czasie
55 Group: Libraries/Python
56 Requires: python3-modules >= 1:3.3
58 %description -n python3-freezegun
59 FreezeGun is a library that allows your Python tests to travel through
60 time by mocking the datetime module.
62 %description -n python3-freezegun -l pl.UTF-8
63 FreezeGun to biblioteka pozwalająca testom w Pythonie podróżowanie w
64 czasie dzięki atrapie modułu datetime.
67 %setup -q -n freezegun-%{version}
75 nosetests-%{py_ver} tests
83 nosetests-%{py3_ver} tests
88 rm -rf $RPM_BUILD_ROOT
101 rm -rf $RPM_BUILD_ROOT
105 %defattr(644,root,root,755)
106 %doc AUTHORS.rst CHANGELOG README.rst
107 %{py_sitescriptdir}/freezegun
108 %{py_sitescriptdir}/freezegun-%{version}-py*.egg-info
112 %files -n python3-freezegun
113 %defattr(644,root,root,755)
114 %doc AUTHORS.rst CHANGELOG README.rst
115 %{py3_sitescriptdir}/freezegun
116 %{py3_sitescriptdir}/freezegun-%{version}-py*.egg-info