]> git.pld-linux.org Git - packages/python-dateutil.git/blame - python-dateutil.spec
rebuild with python 3.10
[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
8bafb6d6 13Release: 3
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
b3539404 55Requires: tzdata >= %{tzdata_ver}
fbb08368 56BuildArch: noarch
925dc3fc
MK
57BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
58
59%description
88fadcb5
JB
60The dateutil module provides powerful extensions to the standard
61datetime module, available in Python 2.3+. Allows:
62- computing of relative deltas (next month, next year, next monday,
63 last week of month, etc),
64- computing of dates based on very flexible recurrence rules, using a
65 superset of the [WWW] iCalendar specification,
925dc3fc
MK
66- parsing of RFC strings,
67- peneric parsing of dates in almost any string format.
68
3bd4f362
JB
69This package contains Python 2.x module.
70
fc872035
JR
71%description -l pl.UTF-8
72Moduł dateutil jest potężnym rozszerzeniem standardowego modułu
73datetime, dostępnego w Pythonie 2.3+. Pozwala na:
74- obliczanie relatywnych różnic (następny miesiąc, rok, poniedziałek,
75 ostatni tydzień miesiąca itp.),
88fadcb5 76- obliczanie dat w oparciu o bardzo elastyczne rekurencyjne zasady, z
fc872035
JR
77 użyciem nadzbioru specyfikacji [WWW] iCalendar,
78- analizę łańcuchow znakowych RFC,
79- analizę dat w prawie każdym formacie.
925dc3fc 80
3bd4f362
JB
81Ten pakiet zawiera moduł Pythona 2.x.
82
56230308
JB
83%package zoneinfo
84Summary: Internal zoneinfo implementation for Python 2 dateutil module
85Summary(pl.UTF-8): Wewnętrzna implementacja zoneinfo dla modułu Pythona 2 dateutil
86Group: Libraries/Python
87Requires: %{name} = %{version}-%{release}
88
89%description zoneinfo
90Internal zoneinfo implementation for Python 2 dateutil module.
91
92Note: it contains own timezone database, which might not be up to date
93with system zoneinfo data.
94
95%description zoneinfo -l pl.UTF-8
96Wewnętrzna implementacja zoneinfo dla modułu Pythona 2 dateutil.
97
98Uwaga: zawiera własną bazę danych stref czasowych, która nie musi być
99aktualna w stosunku do systemowych danych zoneinfo.
100
3bd4f362
JB
101%package -n python3-dateutil
102Summary: Extensions to the standard Python datetime module
103Summary(pl.UTF-8): Rozszerzenia modułu datetime języka Python
104Group: Libraries/Python
b3539404 105Requires: tzdata >= %{tzdata_ver}
3bd4f362
JB
106
107%description -n python3-dateutil
108The dateutil module provides powerful extensions to the standard
109datetime module, available in Python 2.3+. Allows:
110- computing of relative deltas (next month, next year, next monday,
111 last week of month, etc),
112- computing of dates based on very flexible recurrence rules, using a
113 superset of the [WWW] iCalendar specification,
114- parsing of RFC strings,
115- peneric parsing of dates in almost any string format.
116
117This package contains Python 3.x module.
118
119%description -n python3-dateutil -l pl.UTF-8
120Moduł dateutil jest potężnym rozszerzeniem standardowego modułu
121datetime, dostępnego w Pythonie 2.3+. Pozwala na:
122- obliczanie relatywnych różnic (następny miesiąc, rok, poniedziałek,
123 ostatni tydzień miesiąca itp.),
124- obliczanie dat w oparciu o bardzo elastyczne rekurencyjne zasady, z
125 użyciem nadzbioru specyfikacji [WWW] iCalendar,
126- analizę łańcuchow znakowych RFC,
127- analizę dat w prawie każdym formacie.
128
129Ten pakiet zawiera moduł Pythona 3.x.
130
56230308 131%package -n python3-dateutil-zoneinfo
52e044dc
JB
132Summary: Internal zoneinfo implementation for Python 3 dateutil module
133Summary(pl.UTF-8): Wewnętrzna implementacja zoneinfo dla modułu Pythona 3 dateutil
56230308
JB
134Group: Libraries/Python
135Requires: python3-dateutil = %{version}-%{release}
136
137%description -n python3-dateutil-zoneinfo
52e044dc 138Internal zoneinfo implementation for Python 3 dateutil module.
56230308
JB
139
140Note: it contains own timezone database, which might not be up to date
141with system zoneinfo data.
142
143%description -n python3-dateutil-zoneinfo -l pl.UTF-8
52e044dc 144Wewnętrzna implementacja zoneinfo dla modułu Pythona 3 dateutil.
56230308
JB
145
146Uwaga: zawiera własną bazę danych stref czasowych, która nie musi być
147aktualna w stosunku do systemowych danych zoneinfo.
148
925dc3fc
MK
149%prep
150%setup -q
151
152%build
3bd4f362 153%if %{with python2}
3a7a3074
JB
154%py_build
155
156%if %{with tests}
d734fdcb 157# python 2 pytest on builders seem to fail when passing exception containing non-ascii characters
5949c5eb
JB
158# test_tz_prop.py fails with non-UTC timezone
159LC_ALL=C.UTF-8 \
160PYTHONIOENCODING=utf8 \
161PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
162PYTEST_PLUGINS=pytest_cov.plugin \
3a7a3074 163PYTHONPATH=$(pwd) \
5949c5eb 164TZ=UTC \
d734fdcb 165%{__python} -m pytest --deselect=dateutil/test/test_isoparser.py::test_iso_raises dateutil/test
3a7a3074 166%endif
3bd4f362
JB
167%endif
168
169%if %{with python3}
3a7a3074
JB
170%py3_build
171
172%if %{with tests}
5949c5eb
JB
173PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
174PYTEST_PLUGINS=pytest_cov.plugin \
3a7a3074 175PYTHONPATH=$(pwd) \
5949c5eb 176TZ=UTC \
3a7a3074
JB
177%{__python3} -m pytest dateutil/test
178%endif
3bd4f362 179%endif
925dc3fc
MK
180
181%install
182rm -rf $RPM_BUILD_ROOT
3bd4f362
JB
183
184%if %{with python2}
4dcd62fb 185%py_install
925dc3fc 186
fbb08368 187%py_postclean
3bd4f362
JB
188%endif
189
190%if %{with python3}
4dcd62fb 191%py3_install
3bd4f362 192%endif
4c88eeb4 193
925dc3fc
MK
194%clean
195rm -rf $RPM_BUILD_ROOT
196
3bd4f362 197%if %{with python2}
925dc3fc
MK
198%files
199%defattr(644,root,root,755)
56230308
JB
200%doc LICENSE NEWS README.rst
201%dir %{py_sitescriptdir}/dateutil
202%{py_sitescriptdir}/dateutil/*.py[co]
3a7a3074 203%{py_sitescriptdir}/dateutil/parser
56230308 204%{py_sitescriptdir}/dateutil/tz
3bd4f362 205%{py_sitescriptdir}/python_dateutil-%{version}-py*.egg-info
56230308
JB
206
207%files zoneinfo
208%defattr(644,root,root,755)
209%{py_sitescriptdir}/dateutil/zoneinfo
3bd4f362
JB
210%endif
211
212%if %{with python3}
213%files -n python3-dateutil
214%defattr(644,root,root,755)
56230308
JB
215%doc LICENSE NEWS README.rst
216%dir %{py3_sitescriptdir}/dateutil
217%{py3_sitescriptdir}/dateutil/*.py
218%{py3_sitescriptdir}/dateutil/__pycache__
3a7a3074 219%{py3_sitescriptdir}/dateutil/parser
56230308 220%{py3_sitescriptdir}/dateutil/tz
3bd4f362 221%{py3_sitescriptdir}/python_dateutil-%{version}-py*.egg-info
56230308
JB
222
223%files -n python3-dateutil-zoneinfo
224%defattr(644,root,root,755)
225%{py3_sitescriptdir}/dateutil/zoneinfo
3bd4f362 226%endif
This page took 1.829888 seconds and 4 git commands to generate.