]> git.pld-linux.org Git - packages/python-dateutil.git/blob - python-dateutil.spec
4fcdf673cb3401fc248eaa274d4e6205fac40cd4
[packages/python-dateutil.git] / python-dateutil.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # CPython 2.x module
4 %bcond_without  python3 # CPython 3.x module
5 %bcond_without  tests   # unit tests
6
7 %define         module dateutil
8 %define         tzdata_ver      2018e
9 Summary:        Extensions to the standard Python datetime module
10 Summary(pl.UTF-8):      Rozszerzenia modułu datetime języka Python
11 Name:           python-dateutil
12 Version:        2.7.3
13 Release:        1
14 License:        Apache v2.0 or BSD
15 Group:          Libraries/Python
16 # Source0Download: https://pypi.org/simple/python-dateutil/
17 Source0:        https://files.pythonhosted.org/packages/source/p/python_dateutil/%{name}-%{version}.tar.gz
18 # Source0-md5:  175b7c1a3cc0cb01151eced07c61c0b8
19 URL:            https://dateutil.readthedocs.org/
20 %if %{with python2}
21 BuildRequires:  python-modules >= 1:2.7
22 BuildRequires:  python-setuptools
23 BuildRequires:  python-setuptools_scm
24 %if %{with tests}
25 BuildRequires:  python-freezegun
26 BuildRequires:  python-hypothesis >= 3.30
27 BuildRequires:  python-mock
28 BuildRequires:  python-pytest >= 3.0
29 BuildRequires:  python-six >= 1.5
30 %if "%{py_ver}" < "2.7"
31 BuildRequires:  python-unittest2
32 %endif
33 %endif
34 %endif
35 %if %{with python3}
36 BuildRequires:  python3-modules >= 1:3.3
37 BuildRequires:  python3-setuptools
38 BuildRequires:  python3-setuptools_scm
39 %if %{with tests}
40 BuildRequires:  python3-freezegun
41 BuildRequires:  python3-hypothesis >= 3.30
42 BuildRequires:  python3-pytest >= 3.0
43 BuildRequires:  python3-six >= 1.5
44 %endif
45 %endif
46 BuildRequires:  rpm-pythonprov
47 BuildRequires:  rpmbuild(macros) >= 1.714
48 Requires:       tzdata >= %{tzdata_ver}
49 BuildArch:      noarch
50 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51
52 %description
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,
59 - parsing of RFC strings,
60 - peneric parsing of dates in almost any string format.
61
62 This package contains Python 2.x module.
63
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.),
69 - obliczanie dat w oparciu o bardzo elastyczne rekurencyjne zasady, z
70   użyciem nadzbioru specyfikacji [WWW] iCalendar,
71 - analizę łańcuchow znakowych RFC,
72 - analizę dat w prawie każdym formacie.
73
74 Ten pakiet zawiera moduł Pythona 2.x.
75
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
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
98 Requires:       tzdata >= %{tzdata_ver}
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
124 %package -n python3-dateutil-zoneinfo
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
127 Group:          Libraries/Python
128 Requires:       python3-dateutil = %{version}-%{release}
129
130 %description -n python3-dateutil-zoneinfo
131 Internal zoneinfo implementation for Python 3 dateutil module.
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
137 Wewnętrzna implementacja zoneinfo dla modułu Pythona 3 dateutil.
138
139 Uwaga: zawiera własną bazę danych stref czasowych, która nie musi być
140 aktualna w stosunku do systemowych danych zoneinfo.
141
142 %prep
143 %setup -q
144
145 %build
146 %if %{with python2}
147 %py_build
148
149 %if %{with tests}
150 PYTHONPATH=$(pwd) \
151 %{__python} -m pytest dateutil/test
152 %endif
153 %endif
154
155 %if %{with python3}
156 %py3_build
157
158 %if %{with tests}
159 PYTHONPATH=$(pwd) \
160 %{__python3} -m pytest dateutil/test
161 %endif
162 %endif
163
164 %install
165 rm -rf $RPM_BUILD_ROOT
166
167 %if %{with python2}
168 %py_install
169
170 %py_postclean
171 %endif
172
173 %if %{with python3}
174 %py3_install
175 %endif
176
177 %clean
178 rm -rf $RPM_BUILD_ROOT
179
180 %if %{with python2}
181 %files
182 %defattr(644,root,root,755)
183 %doc LICENSE NEWS README.rst
184 %dir %{py_sitescriptdir}/dateutil
185 %{py_sitescriptdir}/dateutil/*.py[co]
186 %{py_sitescriptdir}/dateutil/parser
187 %{py_sitescriptdir}/dateutil/tz
188 %{py_sitescriptdir}/python_dateutil-%{version}-py*.egg-info
189
190 %files zoneinfo
191 %defattr(644,root,root,755)
192 %{py_sitescriptdir}/dateutil/zoneinfo
193 %endif
194
195 %if %{with python3}
196 %files -n python3-dateutil
197 %defattr(644,root,root,755)
198 %doc LICENSE NEWS README.rst
199 %dir %{py3_sitescriptdir}/dateutil
200 %{py3_sitescriptdir}/dateutil/*.py
201 %{py3_sitescriptdir}/dateutil/__pycache__
202 %{py3_sitescriptdir}/dateutil/parser
203 %{py3_sitescriptdir}/dateutil/tz
204 %{py3_sitescriptdir}/python_dateutil-%{version}-py*.egg-info
205
206 %files -n python3-dateutil-zoneinfo
207 %defattr(644,root,root,755)
208 %{py3_sitescriptdir}/dateutil/zoneinfo
209 %endif
This page took 0.045624 seconds and 2 git commands to generate.