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