]>
Commit | Line | Data |
---|---|---|
3bd4f362 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without python2 # CPython 2.x module | |
4 | %bcond_without python3 # CPython 3.x module | |
15ddfab5 | 5 | %bcond_without tests # unit tests |
3bd4f362 | 6 | |
4c88eeb4 | 7 | %define module dateutil |
3a7a3074 | 8 | %define tzdata_ver 2018e |
3bd4f362 | 9 | Summary: Extensions to the standard Python datetime module |
4edbeb34 | 10 | Summary(pl.UTF-8): Rozszerzenia modułu datetime języka Python |
925dc3fc | 11 | Name: python-dateutil |
11597892 | 12 | Version: 2.7.5 |
3a7a3074 JB |
13 | Release: 1 |
14 | License: Apache v2.0 or BSD | |
925dc3fc | 15 | Group: Libraries/Python |
3a7a3074 | 16 | # Source0Download: https://pypi.org/simple/python-dateutil/ |
11597892 AM |
17 | Source0: http://pypi.debian.net/python-dateutil/%{name}-%{version}.tar.gz |
18 | # Source0-md5: 6357f8f42cbe0e0e0b1e543f3aad07b7 | |
56230308 | 19 | URL: https://dateutil.readthedocs.org/ |
3bd4f362 | 20 | %if %{with python2} |
3a7a3074 | 21 | BuildRequires: python-modules >= 1:2.7 |
0fb699fa | 22 | BuildRequires: python-setuptools |
3a7a3074 | 23 | BuildRequires: python-setuptools_scm |
15ddfab5 | 24 | %if %{with tests} |
3a7a3074 JB |
25 | BuildRequires: python-freezegun |
26 | BuildRequires: python-hypothesis >= 3.30 | |
27 | BuildRequires: python-mock | |
28 | BuildRequires: python-pytest >= 3.0 | |
15ddfab5 JB |
29 | BuildRequires: python-six >= 1.5 |
30 | %if "%{py_ver}" < "2.7" | |
31 | BuildRequires: python-unittest2 | |
32 | %endif | |
33 | %endif | |
3bd4f362 JB |
34 | %endif |
35 | %if %{with python3} | |
3a7a3074 | 36 | BuildRequires: python3-modules >= 1:3.3 |
0fb699fa | 37 | BuildRequires: python3-setuptools |
3a7a3074 | 38 | BuildRequires: python3-setuptools_scm |
15ddfab5 | 39 | %if %{with tests} |
3a7a3074 JB |
40 | BuildRequires: python3-freezegun |
41 | BuildRequires: python3-hypothesis >= 3.30 | |
42 | BuildRequires: python3-pytest >= 3.0 | |
15ddfab5 | 43 | BuildRequires: python3-six >= 1.5 |
3bd4f362 | 44 | %endif |
15ddfab5 JB |
45 | %endif |
46 | BuildRequires: rpm-pythonprov | |
47 | BuildRequires: rpmbuild(macros) >= 1.714 | |
b3539404 | 48 | Requires: tzdata >= %{tzdata_ver} |
fbb08368 | 49 | BuildArch: noarch |
925dc3fc MK |
50 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
51 | ||
52 | %description | |
88fadcb5 JB |
53 | The dateutil module provides powerful extensions to the standard |
54 | datetime module, available in Python 2.3+. Allows: | |
55 | - computing of relative deltas (next month, next year, next monday, | |
56 | last week of month, etc), | |
57 | - computing of dates based on very flexible recurrence rules, using a | |
58 | superset of the [WWW] iCalendar specification, | |
925dc3fc MK |
59 | - parsing of RFC strings, |
60 | - peneric parsing of dates in almost any string format. | |
61 | ||
3bd4f362 JB |
62 | This package contains Python 2.x module. |
63 | ||
fc872035 JR |
64 | %description -l pl.UTF-8 |
65 | Moduł dateutil jest potężnym rozszerzeniem standardowego modułu | |
66 | datetime, dostępnego w Pythonie 2.3+. Pozwala na: | |
67 | - obliczanie relatywnych różnic (następny miesiąc, rok, poniedziałek, | |
68 | ostatni tydzień miesiąca itp.), | |
88fadcb5 | 69 | - obliczanie dat w oparciu o bardzo elastyczne rekurencyjne zasady, z |
fc872035 JR |
70 | użyciem nadzbioru specyfikacji [WWW] iCalendar, |
71 | - analizę łańcuchow znakowych RFC, | |
72 | - analizę dat w prawie każdym formacie. | |
925dc3fc | 73 | |
3bd4f362 JB |
74 | Ten pakiet zawiera moduł Pythona 2.x. |
75 | ||
56230308 JB |
76 | %package zoneinfo |
77 | Summary: Internal zoneinfo implementation for Python 2 dateutil module | |
78 | Summary(pl.UTF-8): Wewnętrzna implementacja zoneinfo dla modułu Pythona 2 dateutil | |
79 | Group: Libraries/Python | |
80 | Requires: %{name} = %{version}-%{release} | |
81 | ||
82 | %description zoneinfo | |
83 | Internal zoneinfo implementation for Python 2 dateutil module. | |
84 | ||
85 | Note: it contains own timezone database, which might not be up to date | |
86 | with system zoneinfo data. | |
87 | ||
88 | %description zoneinfo -l pl.UTF-8 | |
89 | Wewnętrzna implementacja zoneinfo dla modułu Pythona 2 dateutil. | |
90 | ||
91 | Uwaga: zawiera własną bazę danych stref czasowych, która nie musi być | |
92 | aktualna w stosunku do systemowych danych zoneinfo. | |
93 | ||
3bd4f362 JB |
94 | %package -n python3-dateutil |
95 | Summary: Extensions to the standard Python datetime module | |
96 | Summary(pl.UTF-8): Rozszerzenia modułu datetime języka Python | |
97 | Group: Libraries/Python | |
b3539404 | 98 | Requires: tzdata >= %{tzdata_ver} |
3bd4f362 JB |
99 | |
100 | %description -n python3-dateutil | |
101 | The dateutil module provides powerful extensions to the standard | |
102 | datetime module, available in Python 2.3+. Allows: | |
103 | - computing of relative deltas (next month, next year, next monday, | |
104 | last week of month, etc), | |
105 | - computing of dates based on very flexible recurrence rules, using a | |
106 | superset of the [WWW] iCalendar specification, | |
107 | - parsing of RFC strings, | |
108 | - peneric parsing of dates in almost any string format. | |
109 | ||
110 | This package contains Python 3.x module. | |
111 | ||
112 | %description -n python3-dateutil -l pl.UTF-8 | |
113 | Moduł dateutil jest potężnym rozszerzeniem standardowego modułu | |
114 | datetime, dostępnego w Pythonie 2.3+. Pozwala na: | |
115 | - obliczanie relatywnych różnic (następny miesiąc, rok, poniedziałek, | |
116 | ostatni tydzień miesiąca itp.), | |
117 | - obliczanie dat w oparciu o bardzo elastyczne rekurencyjne zasady, z | |
118 | użyciem nadzbioru specyfikacji [WWW] iCalendar, | |
119 | - analizę łańcuchow znakowych RFC, | |
120 | - analizę dat w prawie każdym formacie. | |
121 | ||
122 | Ten pakiet zawiera moduł Pythona 3.x. | |
123 | ||
56230308 | 124 | %package -n python3-dateutil-zoneinfo |
52e044dc JB |
125 | Summary: Internal zoneinfo implementation for Python 3 dateutil module |
126 | Summary(pl.UTF-8): Wewnętrzna implementacja zoneinfo dla modułu Pythona 3 dateutil | |
56230308 JB |
127 | Group: Libraries/Python |
128 | Requires: python3-dateutil = %{version}-%{release} | |
129 | ||
130 | %description -n python3-dateutil-zoneinfo | |
52e044dc | 131 | Internal zoneinfo implementation for Python 3 dateutil module. |
56230308 JB |
132 | |
133 | Note: it contains own timezone database, which might not be up to date | |
134 | with system zoneinfo data. | |
135 | ||
136 | %description -n python3-dateutil-zoneinfo -l pl.UTF-8 | |
52e044dc | 137 | Wewnętrzna implementacja zoneinfo dla modułu Pythona 3 dateutil. |
56230308 JB |
138 | |
139 | Uwaga: zawiera własną bazę danych stref czasowych, która nie musi być | |
140 | aktualna w stosunku do systemowych danych zoneinfo. | |
141 | ||
925dc3fc MK |
142 | %prep |
143 | %setup -q | |
144 | ||
145 | %build | |
3bd4f362 | 146 | %if %{with python2} |
3a7a3074 JB |
147 | %py_build |
148 | ||
149 | %if %{with tests} | |
150 | PYTHONPATH=$(pwd) \ | |
151 | %{__python} -m pytest dateutil/test | |
152 | %endif | |
3bd4f362 JB |
153 | %endif |
154 | ||
155 | %if %{with python3} | |
3a7a3074 JB |
156 | %py3_build |
157 | ||
158 | %if %{with tests} | |
159 | PYTHONPATH=$(pwd) \ | |
160 | %{__python3} -m pytest dateutil/test | |
161 | %endif | |
3bd4f362 | 162 | %endif |
925dc3fc MK |
163 | |
164 | %install | |
165 | rm -rf $RPM_BUILD_ROOT | |
3bd4f362 JB |
166 | |
167 | %if %{with python2} | |
4dcd62fb | 168 | %py_install |
925dc3fc | 169 | |
fbb08368 | 170 | %py_postclean |
3bd4f362 JB |
171 | %endif |
172 | ||
173 | %if %{with python3} | |
4dcd62fb | 174 | %py3_install |
3bd4f362 | 175 | %endif |
4c88eeb4 | 176 | |
925dc3fc MK |
177 | %clean |
178 | rm -rf $RPM_BUILD_ROOT | |
179 | ||
3bd4f362 | 180 | %if %{with python2} |
925dc3fc MK |
181 | %files |
182 | %defattr(644,root,root,755) | |
56230308 JB |
183 | %doc LICENSE NEWS README.rst |
184 | %dir %{py_sitescriptdir}/dateutil | |
185 | %{py_sitescriptdir}/dateutil/*.py[co] | |
3a7a3074 | 186 | %{py_sitescriptdir}/dateutil/parser |
56230308 | 187 | %{py_sitescriptdir}/dateutil/tz |
3bd4f362 | 188 | %{py_sitescriptdir}/python_dateutil-%{version}-py*.egg-info |
56230308 JB |
189 | |
190 | %files zoneinfo | |
191 | %defattr(644,root,root,755) | |
192 | %{py_sitescriptdir}/dateutil/zoneinfo | |
3bd4f362 JB |
193 | %endif |
194 | ||
195 | %if %{with python3} | |
196 | %files -n python3-dateutil | |
197 | %defattr(644,root,root,755) | |
56230308 JB |
198 | %doc LICENSE NEWS README.rst |
199 | %dir %{py3_sitescriptdir}/dateutil | |
200 | %{py3_sitescriptdir}/dateutil/*.py | |
201 | %{py3_sitescriptdir}/dateutil/__pycache__ | |
3a7a3074 | 202 | %{py3_sitescriptdir}/dateutil/parser |
56230308 | 203 | %{py3_sitescriptdir}/dateutil/tz |
3bd4f362 | 204 | %{py3_sitescriptdir}/python_dateutil-%{version}-py*.egg-info |
56230308 JB |
205 | |
206 | %files -n python3-dateutil-zoneinfo | |
207 | %defattr(644,root,root,755) | |
208 | %{py3_sitescriptdir}/dateutil/zoneinfo | |
3bd4f362 | 209 | %endif |