]> git.pld-linux.org Git - packages/python-babel.git/blame - python-babel.spec
- updated to 2.3.4
[packages/python-babel.git] / python-babel.spec
CommitLineData
8a01110b 1#
21523b25
JK
2# TODO:
3# - tests fail on 'local' timezone
4#
8a01110b 5# Conditional build:
8f729458
JB
6%bcond_without doc # Sphinx documentation
7%bcond_with tests # test target
73c67f0f
JB
8%bcond_without python2 # CPython 2.x module
9%bcond_without python3 # CPython 3.x module
4c63ce1f
MK
10
11%define module babel
73c67f0f
JB
12Summary: Babel - internationalization library for Python 2
13Summary(pl.UTF-8): Babel - biblioteka umiędzynaradawiająca dla Pythona 2
4c63ce1f 14Name: python-%{module}
8f729458 15Version: 2.3.4
4db81d45 16Release: 1
9b3d2ae3 17License: BSD-like
18Group: Development/Languages/Python
8f729458
JB
19#Source0Download: https://pypi.python.org/simple/Babel
20Source0: https://pypi.python.org/packages/6e/96/ba2a2462ed25ca0e651fb7b66e7080f5315f91425a07ea5b34d7c870c114/Babel-%{version}.tar.gz
21# Source0-md5: afa20bc55b0e991833030129ad498f35
006ed0f7 22Patch0: tz.patch
fd18bd52 23URL: http://babel.pocoo.org/
4c63ce1f 24%if %{with python2}
ae844bfa
JB
25BuildRequires: python-devel >= 1:2.6
26BuildRequires: python-devel-tools >= 1:2.6
4761453f
JK
27BuildRequires: python-setuptools
28BuildRequires: python-pytz
9b3d2ae3 29BuildRequires: rpm-pythonprov
d6353e1e 30BuildRequires: rpmbuild(macros) >= 1.710
4c63ce1f
MK
31%endif
32%if %{with python3}
ae844bfa
JB
33BuildRequires: python3-devel >= 1:3.3
34BuildRequires: python3-devel-tools >= 1:3.3
fd18bd52 35BuildRequires: python3-setuptools
ae844bfa 36BuildRequires: python3-modules >= 1:3.3
4761453f 37BuildRequires: python3-pytz
4c63ce1f 38%endif
8340e96b 39%{?with_doc:BuildRequires: sphinx-pdg}
ae844bfa 40Requires: python-modules >= 1:2.6
4761453f 41Requires: python-pytz
c33e1e26 42Obsoletes: python-Babel
9b3d2ae3 43BuildArch: noarch
44BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45
46%description
47Babel is a Python library that provides an integrated collection of
48utilities that assist with internationalizing and localizing Python
0060fa76 49applications (in particular web-based applications).
9b3d2ae3 50
73c67f0f
JB
51%description -l pl.UTF-8
52Babel to biblioteka Pythona zawierająca zintegrowany zbiór narzędzi
53pomagających przy umiędzynaradawianiu i lokalizowaniu aplikacji w
54Pythonie (w szczególności aplikacji WWW).
4c63ce1f
MK
55
56%package -n python3-%{module}
73c67f0f
JB
57Summary: Babel - internationalization library for Python 3
58Summary(pl.UTF-8): Babel - biblioteka umiędzynaradawiająca dla Pythona 3
4c63ce1f 59Group: Libraries/Python
ae844bfa 60Requires: python3-modules >= 1:3.3
4761453f 61Requires: python3-pytz
4c63ce1f
MK
62
63%description -n python3-%{module}
64Babel is a Python library that provides an integrated collection of
65utilities that assist with internationalizing and localizing Python
66applications (in particular web-based applications).
67
73c67f0f
JB
68%description -n python3-%{module} -l pl.UTF-8
69Babel to biblioteka Pythona zawierająca zintegrowany zbiór narzędzi
70pomagających przy umiędzynaradawianiu i lokalizowaniu aplikacji w
71Pythonie (w szczególności aplikacji WWW).
4c63ce1f 72
8a01110b
ER
73%package apidocs
74Summary: Python Babel API documentation
73c67f0f 75Summary(pl.UTF-8): Dokumentacja API biblioteki Pythona Babel
8a01110b
ER
76Group: Documentation
77
78%description apidocs
79Python Babel API documentation.
80
73c67f0f
JB
81%description apidocs -l pl.UTF-8
82Dokumentacja API biblioteki Pythona Babel.
83
9b3d2ae3 84%prep
c33e1e26 85%setup -q -n Babel-%{version}
006ed0f7 86%patch0 -p1
9b3d2ae3 87
88%build
4c63ce1f 89%if %{with python2}
e8952ced 90%py_build %{?with_tests:test}
4c63ce1f
MK
91%endif
92
93%if %{with python3}
e8952ced 94%py3_build %{?with_tests:test}
4c63ce1f
MK
95%endif
96
97%if %{with doc}
98cd docs
99%{__make} -j1 html
ae844bfa 100%{__rm} -r _build/html/_sources
4c63ce1f 101%endif
9b3d2ae3 102
103%install
104rm -rf $RPM_BUILD_ROOT
4c63ce1f 105
73c67f0f 106%if %{with python3}
e8952ced 107%py3_install
9b3d2ae3 108
73c67f0f 109%{__mv} $RPM_BUILD_ROOT%{_bindir}/{pybabel,pybabel3}
4c63ce1f
MK
110%endif
111
73c67f0f 112%if %{with python2}
e8952ced 113%py_install
73c67f0f
JB
114
115%py_postclean
4c63ce1f 116%endif
8a01110b 117
8f729458 118find $RPM_BUILD_ROOT%{py_sitescriptdir}/babel/locale-data -name '*.dat' | \
73c67f0f
JB
119 sed -e "s#^$RPM_BUILD_ROOT##" | \
120 sed -ne 's,.*/\([a-z][a-z][a-z]\?\)\(_[0-9][0-9][0-9]\|_[A-Z][a-z][a-z][a-z]\)\?\(_[A-Z][A-Z]\)\?\(_POSIX\)\?\.dat$,%lang(\1\3) &,p' > py2.lang
121
8f729458 122find $RPM_BUILD_ROOT%{py3_sitescriptdir}/babel/locale-data -name '*.dat' | \
73c67f0f
JB
123 sed -e "s#^$RPM_BUILD_ROOT##" | \
124 sed -ne 's,.*/\([a-z][a-z][a-z]\?\)\(_[0-9][0-9][0-9]\|_[A-Z][a-z][a-z][a-z]\)\?\(_[A-Z][A-Z]\)\?\(_POSIX\)\?\.dat,%lang(\1\3) &,p' > py3.lang
125
9b3d2ae3 126%clean
127rm -rf $RPM_BUILD_ROOT
128
4c63ce1f 129%if %{with python2}
73c67f0f 130%files -f py2.lang
9b3d2ae3 131%defattr(644,root,root,755)
8f729458 132%doc AUTHORS CHANGES LICENSE
9b3d2ae3 133%attr(755,root,root) %{_bindir}/pybabel
bc10f8db 134%dir %{py_sitescriptdir}/babel
73c67f0f 135%{py_sitescriptdir}/babel/global.dat
bc10f8db 136%{py_sitescriptdir}/babel/*.py[co]
4c63ce1f
MK
137%dir %{py_sitescriptdir}/babel/localtime
138%{py_sitescriptdir}/babel/localtime/*.py[co]
8f729458
JB
139%dir %{py_sitescriptdir}/babel/locale-data
140%{py_sitescriptdir}/babel/locale-data/root.dat
141%lang(ca_ES@valencia) %{py_sitescriptdir}/babel/locale-data/ca_ES_VALENCIA.dat
bc10f8db
ER
142%dir %{py_sitescriptdir}/babel/messages
143%{py_sitescriptdir}/babel/messages/*.py[co]
4c63ce1f
MK
144%{py_sitescriptdir}/Babel-%{version}-py*.egg-info
145%endif
4c63ce1f
MK
146
147%if %{with python3}
73c67f0f 148%files -n python3-%{module} -f py3.lang
4c63ce1f 149%defattr(644,root,root,755)
8f729458 150%doc AUTHORS CHANGES LICENSE
73c67f0f
JB
151%attr(755,root,root) %{_bindir}/pybabel3
152%dir %{py3_sitescriptdir}/babel
153%{py3_sitescriptdir}/babel/__pycache__
154%{py3_sitescriptdir}/babel/global.dat
155%{py3_sitescriptdir}/babel/*.py
156%{py3_sitescriptdir}/babel/localtime
8f729458
JB
157%dir %{py3_sitescriptdir}/babel/locale-data
158%{py3_sitescriptdir}/babel/locale-data/root.dat
159%lang(ca_ES@valencia) %{py3_sitescriptdir}/babel/locale-data/ca_ES_VALENCIA.dat
73c67f0f 160%{py3_sitescriptdir}/babel/messages
4c63ce1f
MK
161%{py3_sitescriptdir}/Babel-%{version}-py*.egg-info
162%endif
163
164%if %{with doc}
8a01110b
ER
165%files apidocs
166%defattr(644,root,root,755)
4c63ce1f 167%doc docs/_build/html/*
8a01110b 168%endif
This page took 0.08596 seconds and 4 git commands to generate.