]> git.pld-linux.org Git - packages/python-dateutil.git/blob - python-dateutil.spec
b43f4e2c71e626961fec7cded6fdd2b9abbc86f2
[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.8.2
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:  5970010bb72452344df3d76a10281b65
19 URL:            https://dateutil.readthedocs.org/
20 %if %(locale -a | grep -q '^C\.utf8$'; echo $?)
21 BuildRequires:  glibc-localedb-all
22 %endif
23 %if %{with python2}
24 BuildRequires:  python-modules >= 1:2.7
25 BuildRequires:  python-setuptools >= 1:24.3
26 BuildRequires:  python-setuptools_scm
27 %if %{with tests}
28 BuildRequires:  python-freezegun
29 BuildRequires:  python-hypothesis >= 3.30
30 BuildRequires:  python-mock
31 BuildRequires:  python-pytest >= 3.0
32 BuildRequires:  python-six >= 1.5
33 %if "%{py_ver}" < "2.7"
34 BuildRequires:  python-unittest2
35 %endif
36 %endif
37 %endif
38 %if %{with python3}
39 BuildRequires:  python3-modules >= 1:3.3
40 BuildRequires:  python3-setuptools >= 1:24.3
41 BuildRequires:  python3-setuptools_scm
42 %if %{with tests}
43 BuildRequires:  python3-freezegun
44 BuildRequires:  python3-hypothesis >= 3.30
45 BuildRequires:  python3-pytest >= 3.0
46 BuildRequires:  python3-six >= 1.5
47 %endif
48 %endif
49 BuildRequires:  rpm-pythonprov
50 BuildRequires:  rpmbuild(macros) >= 1.714
51 Requires:       tzdata >= %{tzdata_ver}
52 BuildArch:      noarch
53 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54
55 %description
56 The dateutil module provides powerful extensions to the standard
57 datetime module, available in Python 2.3+. Allows:
58 - computing of relative deltas (next month, next year, next monday,
59   last week of month, etc),
60 - computing of dates based on very flexible recurrence rules, using a
61   superset of the [WWW] iCalendar specification,
62 - parsing of RFC strings,
63 - peneric parsing of dates in almost any string format.
64
65 This package contains Python 2.x module.
66
67 %description -l pl.UTF-8
68 Moduł dateutil jest potężnym rozszerzeniem standardowego modułu
69 datetime, dostępnego w Pythonie 2.3+. Pozwala na:
70 - obliczanie relatywnych różnic (następny miesiąc, rok, poniedziałek,
71   ostatni tydzień miesiąca itp.),
72 - obliczanie dat w oparciu o bardzo elastyczne rekurencyjne zasady, z
73   użyciem nadzbioru specyfikacji [WWW] iCalendar,
74 - analizę łańcuchow znakowych RFC,
75 - analizę dat w prawie każdym formacie.
76
77 Ten pakiet zawiera moduł Pythona 2.x.
78
79 %package zoneinfo
80 Summary:        Internal zoneinfo implementation for Python 2 dateutil module
81 Summary(pl.UTF-8):      Wewnętrzna implementacja zoneinfo dla modułu Pythona 2 dateutil
82 Group:          Libraries/Python
83 Requires:       %{name} = %{version}-%{release}
84
85 %description zoneinfo
86 Internal zoneinfo implementation for Python 2 dateutil module.
87
88 Note: it contains own timezone database, which might not be up to date
89 with system zoneinfo data.
90
91 %description zoneinfo -l pl.UTF-8
92 Wewnętrzna implementacja zoneinfo dla modułu Pythona 2 dateutil.
93
94 Uwaga: zawiera własną bazę danych stref czasowych, która nie musi być
95 aktualna w stosunku do systemowych danych zoneinfo.
96
97 %package -n python3-dateutil
98 Summary:        Extensions to the standard Python datetime module
99 Summary(pl.UTF-8):      Rozszerzenia modułu datetime języka Python
100 Group:          Libraries/Python
101 Requires:       tzdata >= %{tzdata_ver}
102
103 %description -n python3-dateutil
104 The dateutil module provides powerful extensions to the standard
105 datetime module, available in Python 2.3+. Allows:
106 - computing of relative deltas (next month, next year, next monday,
107   last week of month, etc),
108 - computing of dates based on very flexible recurrence rules, using a
109   superset of the [WWW] iCalendar specification,
110 - parsing of RFC strings,
111 - peneric parsing of dates in almost any string format.
112
113 This package contains Python 3.x module.
114
115 %description -n python3-dateutil -l pl.UTF-8
116 Moduł dateutil jest potężnym rozszerzeniem standardowego modułu
117 datetime, dostępnego w Pythonie 2.3+. Pozwala na:
118 - obliczanie relatywnych różnic (następny miesiąc, rok, poniedziałek,
119   ostatni tydzień miesiąca itp.),
120 - obliczanie dat w oparciu o bardzo elastyczne rekurencyjne zasady, z
121   użyciem nadzbioru specyfikacji [WWW] iCalendar,
122 - analizę łańcuchow znakowych RFC,
123 - analizę dat w prawie każdym formacie.
124
125 Ten pakiet zawiera moduł Pythona 3.x.
126
127 %package -n python3-dateutil-zoneinfo
128 Summary:        Internal zoneinfo implementation for Python 3 dateutil module
129 Summary(pl.UTF-8):      Wewnętrzna implementacja zoneinfo dla modułu Pythona 3 dateutil
130 Group:          Libraries/Python
131 Requires:       python3-dateutil = %{version}-%{release}
132
133 %description -n python3-dateutil-zoneinfo
134 Internal zoneinfo implementation for Python 3 dateutil module.
135
136 Note: it contains own timezone database, which might not be up to date
137 with system zoneinfo data.
138
139 %description -n python3-dateutil-zoneinfo -l pl.UTF-8
140 Wewnętrzna implementacja zoneinfo dla modułu Pythona 3 dateutil.
141
142 Uwaga: zawiera własną bazę danych stref czasowych, która nie musi być
143 aktualna w stosunku do systemowych danych zoneinfo.
144
145 %prep
146 %setup -q
147
148 %build
149 %if %{with python2}
150 %py_build
151
152 %if %{with tests}
153 # python 2 pytest on builders seem to fail when passing exception containing non-ascii characters
154 LC_ALL=C.UTF-8 PYTHONIOENCODING=utf8 \
155 PYTHONPATH=$(pwd) \
156 %{__python} -m pytest --deselect=dateutil/test/test_isoparser.py::test_iso_raises dateutil/test
157 %endif
158 %endif
159
160 %if %{with python3}
161 %py3_build
162
163 %if %{with tests}
164 PYTHONPATH=$(pwd) \
165 %{__python3} -m pytest dateutil/test
166 %endif
167 %endif
168
169 %install
170 rm -rf $RPM_BUILD_ROOT
171
172 %if %{with python2}
173 %py_install
174
175 %py_postclean
176 %endif
177
178 %if %{with python3}
179 %py3_install
180 %endif
181
182 %clean
183 rm -rf $RPM_BUILD_ROOT
184
185 %if %{with python2}
186 %files
187 %defattr(644,root,root,755)
188 %doc LICENSE NEWS README.rst
189 %dir %{py_sitescriptdir}/dateutil
190 %{py_sitescriptdir}/dateutil/*.py[co]
191 %{py_sitescriptdir}/dateutil/parser
192 %{py_sitescriptdir}/dateutil/tz
193 %{py_sitescriptdir}/python_dateutil-%{version}-py*.egg-info
194
195 %files zoneinfo
196 %defattr(644,root,root,755)
197 %{py_sitescriptdir}/dateutil/zoneinfo
198 %endif
199
200 %if %{with python3}
201 %files -n python3-dateutil
202 %defattr(644,root,root,755)
203 %doc LICENSE NEWS README.rst
204 %dir %{py3_sitescriptdir}/dateutil
205 %{py3_sitescriptdir}/dateutil/*.py
206 %{py3_sitescriptdir}/dateutil/__pycache__
207 %{py3_sitescriptdir}/dateutil/parser
208 %{py3_sitescriptdir}/dateutil/tz
209 %{py3_sitescriptdir}/python_dateutil-%{version}-py*.egg-info
210
211 %files -n python3-dateutil-zoneinfo
212 %defattr(644,root,root,755)
213 %{py3_sitescriptdir}/dateutil/zoneinfo
214 %endif
This page took 0.095204 seconds and 2 git commands to generate.