3 %bcond_without python2 # CPython 2.x module
4 %bcond_without python3 # CPython 3.x module
6 %define module dateutil
7 Summary: Extensions to the standard Python datetime module
8 Summary(pl.UTF-8): Rozszerzenia modułu datetime języka Python
13 Group: Libraries/Python
14 Source0: https://pypi.python.org/packages/source/p/python-dateutil/python-%{module}-%{version}.tar.gz
15 # Source0-md5: c1f654d0ff7e33999380a8ba9783fd5c
16 Patch0: system-zoneinfo.patch
17 URL: http://labix.org/python-dateutil
19 BuildRequires: python-modules >= 1:2.6
20 BuildRequires: python-six
23 BuildRequires: python3-modules >= 1:3.2
24 BuildRequires: python3-six
26 BuildRequires: rpm-pythonprov
27 BuildRequires: rpmbuild(macros) >= 0.219
29 Requires: tzdata >= 2013h
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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,
40 - parsing of RFC strings,
41 - peneric parsing of dates in almost any string format.
43 This package contains Python 2.x module.
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.),
50 - obliczanie dat w oparciu o bardzo elastyczne rekurencyjne zasady, z
51 użyciem nadzbioru specyfikacji [WWW] iCalendar,
52 - analizę łańcuchow znakowych RFC,
53 - analizę dat w prawie każdym formacie.
55 Ten pakiet zawiera moduł Pythona 2.x.
57 %package -n python3-dateutil
58 Summary: Extensions to the standard Python datetime module
59 Summary(pl.UTF-8): Rozszerzenia modułu datetime języka Python
60 Group: Libraries/Python
62 Requires: tzdata >= 2013h
64 %description -n python3-dateutil
65 The dateutil module provides powerful extensions to the standard
66 datetime module, available in Python 2.3+. Allows:
67 - computing of relative deltas (next month, next year, next monday,
68 last week of month, etc),
69 - computing of dates based on very flexible recurrence rules, using a
70 superset of the [WWW] iCalendar specification,
71 - parsing of RFC strings,
72 - peneric parsing of dates in almost any string format.
74 This package contains Python 3.x module.
76 %description -n python3-dateutil -l pl.UTF-8
77 Moduł dateutil jest potężnym rozszerzeniem standardowego modułu
78 datetime, dostępnego w Pythonie 2.3+. Pozwala na:
79 - obliczanie relatywnych różnic (następny miesiąc, rok, poniedziałek,
80 ostatni tydzień miesiąca itp.),
81 - obliczanie dat w oparciu o bardzo elastyczne rekurencyjne zasady, z
82 użyciem nadzbioru specyfikacji [WWW] iCalendar,
83 - analizę łańcuchow znakowych RFC,
84 - analizę dat w prawie każdym formacie.
86 Ten pakiet zawiera moduł Pythona 3.x.
94 %{__python} setup.py build --build-base build-2
98 %{__python3} setup.py build --build-base build-3
102 rm -rf $RPM_BUILD_ROOT
105 %{__python} setup.py \
106 build --build-base build-2 \
110 --root=$RPM_BUILD_ROOT
114 # NOTE: Not sure but seems zoneinfo is needed under windows only
115 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/dateutil/zoneinfo
119 %{__python3} setup.py \
120 build --build-base build-3 \
124 --root=$RPM_BUILD_ROOT
126 # NOTE: Not sure but seems zoneinfo is needed under windows only
127 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/dateutil/zoneinfo
131 rm -rf $RPM_BUILD_ROOT
135 %defattr(644,root,root,755)
136 %doc LICENSE NEWS README
137 %{py_sitescriptdir}/dateutil
138 %{py_sitescriptdir}/python_dateutil-%{version}-py*.egg-info
142 %files -n python3-dateutil
143 %defattr(644,root,root,755)
144 %doc LICENSE NEWS README
145 %{py3_sitescriptdir}/dateutil
146 %{py3_sitescriptdir}/python_dateutil-%{version}-py*.egg-info