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