]> git.pld-linux.org Git - packages/python-dateutil.git/blob - python-dateutil.spec
- now we can build python3 package from this spec
[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
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
9 Name:           python-dateutil
10 Version:        2.2
11 Release:        1
12 License:        BSD
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
18 %if %{with python2}
19 BuildRequires:  python-modules >= 1:2.6
20 BuildRequires:  python-six
21 %endif
22 %if %{with python3}
23 BuildRequires:  python3-modules >= 1:3.2
24 BuildRequires:  python3-six
25 %endif
26 BuildRequires:  rpm-pythonprov
27 BuildRequires:  rpmbuild(macros) >= 0.219
28 Requires:       python-six
29 Requires:       tzdata >= 2013h
30 BuildArch:      noarch
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %description
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.
42
43 This package contains Python 2.x module.
44
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.
54
55 Ten pakiet zawiera moduł Pythona 2.x.
56
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
61 Requires:       python3-six
62 Requires:       tzdata >= 2013h
63
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.
73
74 This package contains Python 3.x module.
75
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.
85
86 Ten pakiet zawiera moduł Pythona 3.x.
87
88 %prep
89 %setup -q
90 %patch0 -p1
91
92 %build
93 %if %{with python2}
94 %{__python} setup.py build --build-base build-2
95 %endif
96
97 %if %{with python3}
98 %{__python3} setup.py build --build-base build-3
99 %endif
100
101 %install
102 rm -rf $RPM_BUILD_ROOT
103
104 %if %{with python2}
105 %{__python} setup.py \
106         build --build-base build-2 \
107         install \
108                 --skip-build \
109                 --optimize=2 \
110                 --root=$RPM_BUILD_ROOT
111
112 %py_postclean
113
114 # NOTE: Not sure but seems zoneinfo is needed under windows only
115 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/dateutil/zoneinfo
116 %endif
117
118 %if %{with python3}
119 %{__python3} setup.py \
120         build --build-base build-3 \
121         install \
122                 --skip-build \
123                 --optimize=2 \
124                 --root=$RPM_BUILD_ROOT
125
126 # NOTE: Not sure but seems zoneinfo is needed under windows only
127 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/dateutil/zoneinfo
128 %endif
129
130 %clean
131 rm -rf $RPM_BUILD_ROOT
132
133 %if %{with python2}
134 %files
135 %defattr(644,root,root,755)
136 %doc LICENSE NEWS README
137 %{py_sitescriptdir}/dateutil
138 %{py_sitescriptdir}/python_dateutil-%{version}-py*.egg-info
139 %endif
140
141 %if %{with python3}
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
147 %endif
This page took 0.069483 seconds and 3 git commands to generate.