]> git.pld-linux.org Git - packages/python-freezegun.git/blame - python-freezegun.spec
BR: python-modules-sqlite
[packages/python-freezegun.git] / python-freezegun.spec
CommitLineData
7f39570e
JB
1#
2# Conditional build:
3%bcond_without tests # unit tests
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
6
7Summary: FreezeGun: Let your Python 2 tests travel through time
8Summary(pl.UTF-8): FreezeGun - umożliwienie testom Pythona 2 podróżowania w czasie
9Name: python-freezegun
10Version: 0.3.10
38ef068b 11Release: 2
7f39570e
JB
12License: Apache v2.0
13Group: Libraries/Python
14#Source0Download: https://pypi.org/simple/freezegun/
15Source0: https://files.pythonhosted.org/packages/source/f/freezegun/freezegun-%{version}.tar.gz
16# Source0-md5: 703b64446743c0d9f81ca9308e5097a0
17Patch0: %{name}-mock.patch
97944efc 18Patch1: %{name}-python3.7.patch
7f39570e
JB
19URL: https://pypi.org/project/freezegun/
20BuildRequires: rpm-pythonprov
21BuildRequires: rpmbuild(macros) >= 1.714
22%if %{with python2}
23BuildRequires: python-modules >= 1:2.6
24BuildRequires: python-setuptools
25%if %{with tests}
26BuildRequires: python-dateutil >= 2.1
27BuildRequires: python-mock
c7631783 28BuildRequires: python-modules-sqlite
7f39570e
JB
29BuildRequires: python-nose
30BuildRequires: python-six
31%endif
32%endif
33%if %{with python3}
34BuildRequires: python3-modules >= 1:3.3
35BuildRequires: python3-setuptools
36%if %{with tests}
37BuildRequires: python3-dateutil >= 2.1
38BuildRequires: python3-nose
39BuildRequires: python3-six
40%endif
41%endif
42Requires: python-modules >= 1:2.6
43BuildArch: noarch
44BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45
46%description
47FreezeGun is a library that allows your Python tests to travel through
48time by mocking the datetime module.
49
50%description -l pl.UTF-8
51FreezeGun to biblioteka pozwalająca testom w Pythonie podróżowanie w
52czasie dzięki atrapie modułu datetime.
53
54%package -n python3-freezegun
55Summary: FreezeGun: Let your Python 3 tests travel through time
56Summary(pl.UTF-8): FreezeGun - umożliwienie testom Pythona 3 podróżowania w czasie
57Group: Libraries/Python
58Requires: python3-modules >= 1:3.3
59
60%description -n python3-freezegun
61FreezeGun is a library that allows your Python tests to travel through
62time by mocking the datetime module.
63
64%description -n python3-freezegun -l pl.UTF-8
65FreezeGun to biblioteka pozwalająca testom w Pythonie podróżowanie w
66czasie dzięki atrapie modułu datetime.
67
68%prep
69%setup -q -n freezegun-%{version}
70%patch0 -p1
97944efc 71%patch1 -p1
7f39570e
JB
72
73%build
74%if %{with python2}
75%py_build
76
77%if %{with tests}
78nosetests-%{py_ver} tests
79%endif
80%endif
81
82%if %{with python3}
83%py3_build
84
85%if %{with tests}
86nosetests-%{py3_ver} tests
87%endif
88%endif
89
90%install
91rm -rf $RPM_BUILD_ROOT
92
93%if %{with python2}
94%py_install
95
96%py_postclean
97%endif
98
99%if %{with python3}
100%py3_install
101%endif
102
103%clean
104rm -rf $RPM_BUILD_ROOT
105
106%if %{with python2}
107%files
108%defattr(644,root,root,755)
109%doc AUTHORS.rst CHANGELOG README.rst
110%{py_sitescriptdir}/freezegun
111%{py_sitescriptdir}/freezegun-%{version}-py*.egg-info
112%endif
113
114%if %{with python3}
115%files -n python3-freezegun
116%defattr(644,root,root,755)
117%doc AUTHORS.rst CHANGELOG README.rst
118%{py3_sitescriptdir}/freezegun
119%{py3_sitescriptdir}/freezegun-%{version}-py*.egg-info
120%endif
This page took 0.1251 seconds and 4 git commands to generate.