]> git.pld-linux.org Git - packages/python-freezegun.git/blob - python-freezegun.spec
- new
[packages/python-freezegun.git] / python-freezegun.spec
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
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
9 Name:           python-freezegun
10 Version:        0.3.10
11 Release:        1
12 License:        Apache v2.0
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
21 %if %{with python2}
22 BuildRequires:  python-modules >= 1:2.6
23 BuildRequires:  python-setuptools
24 %if %{with tests}
25 BuildRequires:  python-dateutil >= 2.1
26 BuildRequires:  python-mock
27 BuildRequires:  python-nose
28 BuildRequires:  python-six
29 %endif
30 %endif
31 %if %{with python3}
32 BuildRequires:  python3-modules >= 1:3.3
33 BuildRequires:  python3-setuptools
34 %if %{with tests}
35 BuildRequires:  python3-dateutil >= 2.1
36 BuildRequires:  python3-nose
37 BuildRequires:  python3-six
38 %endif
39 %endif
40 Requires:       python-modules >= 1:2.6
41 BuildArch:      noarch
42 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43
44 %description
45 FreezeGun is a library that allows your Python tests to travel through
46 time by mocking the datetime module.
47
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.
51
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
57
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.
61
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.
65
66 %prep
67 %setup -q -n freezegun-%{version}
68 %patch0 -p1
69
70 %build
71 %if %{with python2}
72 %py_build
73
74 %if %{with tests}
75 nosetests-%{py_ver} tests
76 %endif
77 %endif
78
79 %if %{with python3}
80 %py3_build
81
82 %if %{with tests}
83 nosetests-%{py3_ver} tests
84 %endif
85 %endif
86
87 %install
88 rm -rf $RPM_BUILD_ROOT
89
90 %if %{with python2}
91 %py_install
92
93 %py_postclean
94 %endif
95
96 %if %{with python3}
97 %py3_install
98 %endif
99
100 %clean
101 rm -rf $RPM_BUILD_ROOT
102
103 %if %{with python2}
104 %files
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
109 %endif
110
111 %if %{with python3}
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
117 %endif
This page took 0.435347 seconds and 3 git commands to generate.