2 # - lang tag /usr/share/python*/site-packages/babel/localedata/*
5 %bcond_without doc # don't build doc
6 %bcond_without tests # do not perform "make test"
7 %bcond_without python2 # CPython 2.x module
8 %bcond_without python3 # CPython 3.x module
12 Summary: Babel Python library
13 Summary(pl.UTF-8): Biblioteka Babel do Pythona
14 Name: python-%{module}
18 Group: Development/Languages/Python
19 Source0: http://pypi.python.org/packages/source/B/Babel/Babel-%{version}.tar.gz
20 # Source0-md5: 5264ceb02717843cbc9ffce8e6e06bdb
21 URL: http://babel.pocoo.org/
23 BuildRequires: python-devel
24 BuildRequires: python-devel-tools
25 BuildRequires: python-setuptools
26 BuildRequires: python-pytz
27 BuildRequires: rpm-pythonprov
28 BuildRequires: rpmbuild(macros) >= 1.219
31 BuildRequires: python3-devel
32 BuildRequires: python3-devel-tools
33 BuildRequires: python3-setuptools
34 BuildRequires: python3-modules
35 BuildRequires: python3-pytz
37 Requires: python-modules
39 Obsoletes: python-Babel
41 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44 Babel is a Python library that provides an integrated collection of
45 utilities that assist with internationalizing and localizing Python
46 applications (in particular web-based applications).
48 # %description -l pl.UTF-8
50 %package -n python3-%{module}
51 Summary: Babel Python library
52 Summary(pl.UTF-8): Biblioteka Babel do Pythona
53 Group: Libraries/Python
54 Requires: python3-modules
55 Requires: python3-pytz
57 %description -n python3-%{module}
58 Babel is a Python library that provides an integrated collection of
59 utilities that assist with internationalizing and localizing Python
60 applications (in particular web-based applications).
62 # %description -n python3-%{module} -l pl.UTF-8
65 Summary: Python Babel API documentation
69 Python Babel API documentation.
72 %setup -q -n Babel-%{version}
76 %{__python} setup.py build --build-base build-2 %{?with_tests:test}
80 %{__python3} setup.py build --build-base build-3 %{?with_tests:test}
86 rm -rf _build/html/_sources
90 rm -rf $RPM_BUILD_ROOT
93 %{__python} setup.py \
94 build --build-base build-2 \
95 install --skip-build \
97 --root=$RPM_BUILD_ROOT
103 %{__python3} setup.py \
104 build --build-base build-3 \
105 install --skip-build \
107 --root=$RPM_BUILD_ROOT
111 rm -rf $RPM_BUILD_ROOT
115 %defattr(644,root,root,755)
116 %doc AUTHORS CHANGES LICENSE README
117 %attr(755,root,root) %{_bindir}/pybabel
118 %dir %{py_sitescriptdir}/babel
119 %{py_sitescriptdir}/babel/*.dat
120 %{py_sitescriptdir}/babel/*.py[co]
121 %dir %{py_sitescriptdir}/babel/localtime
122 %{py_sitescriptdir}/babel/localtime/*.py[co]
124 %dir %{py_sitescriptdir}/babel/localedata
126 %{py_sitescriptdir}/babel/localedata/*.dat
127 %dir %{py_sitescriptdir}/babel/messages
128 %{py_sitescriptdir}/babel/messages/*.py[co]
130 %if "%{py_ver}" > "2.4"
131 %{py_sitescriptdir}/Babel-%{version}-py*.egg-info
136 %files -n python3-%{module}
137 %defattr(644,root,root,755)
138 %doc AUTHORS CHANGES LICENSE README
139 %{py3_sitescriptdir}/%{module}
140 %{py3_sitescriptdir}/Babel-%{version}-py*.egg-info
145 %defattr(644,root,root,755)
146 %doc docs/_build/html/*