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