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