]> git.pld-linux.org Git - packages/python-babel.git/blame - python-babel.spec
- python 3.4
[packages/python-babel.git] / python-babel.spec
CommitLineData
8a01110b
ER
1# TODO
2# - lang tag /usr/share/python*/site-packages/babel/localedata/*
3#
4# Conditional build:
4c63ce1f
MK
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
8a01110b 9
4c63ce1f
MK
10
11%define module babel
9b3d2ae3 12Summary: Babel Python library
13Summary(pl.UTF-8): Biblioteka Babel do Pythona
4c63ce1f
MK
14Name: python-%{module}
15Version: 1.3
e8fc5292 16Release: 2
9b3d2ae3 17License: BSD-like
18Group: Development/Languages/Python
4c63ce1f
MK
19Source0: http://pypi.python.org/packages/source/B/Babel/Babel-%{version}.tar.gz
20# Source0-md5: 5264ceb02717843cbc9ffce8e6e06bdb
9b3d2ae3 21URL: http://babel.edgewall.org/
4c63ce1f 22%if %{with python2}
9b3d2ae3 23BuildRequires: python-devel
4fcdb98b 24BuildRequires: python-devel-tools
9b3d2ae3 25BuildRequires: rpm-pythonprov
9b3d2ae3 26BuildRequires: rpmbuild(macros) >= 1.219
4c63ce1f
MK
27%endif
28%if %{with python3}
29BuildRequires: python3-devel
30BuildRequires: python3-distribute
31BuildRequires: python3-modules
32%endif
33
8b5a0641 34Requires: python-modules
c33e1e26 35Obsoletes: python-Babel
9b3d2ae3 36BuildArch: noarch
37BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39%description
40Babel is a Python library that provides an integrated collection of
41utilities that assist with internationalizing and localizing Python
0060fa76 42applications (in particular web-based applications).
9b3d2ae3 43
4c63ce1f
MK
44# %description -l pl.UTF-8
45
46%package -n python3-%{module}
47Summary: -
48Summary(pl.UTF-8): -
49Group: Libraries/Python
50Requires: python3-modules
51
52%description -n python3-%{module}
53Babel is a Python library that provides an integrated collection of
54utilities that assist with internationalizing and localizing Python
55applications (in particular web-based applications).
56
57# %description -n python3-%{module} -l pl.UTF-8
58
8a01110b
ER
59%package apidocs
60Summary: Python Babel API documentation
61Group: Documentation
62
63%description apidocs
64Python Babel API documentation.
65
9b3d2ae3 66%prep
c33e1e26 67%setup -q -n Babel-%{version}
9b3d2ae3 68
69%build
4c63ce1f
MK
70%if %{with python2}
71%{__python} setup.py build --build-base build-2 %{?with_tests:test}
72%endif
73
74%if %{with python3}
75%{__python3} setup.py build --build-base build-3 %{?with_tests:test}
76%endif
77
78%if %{with doc}
79cd docs
80%{__make} -j1 html
81rm -rf _build/html/_sources
82%endif
9b3d2ae3 83
84%install
85rm -rf $RPM_BUILD_ROOT
4c63ce1f
MK
86
87%if %{with python2}
88%{__python} setup.py \
89 build --build-base build-2 \
90 install --skip-build \
91 --optimize=2 \
92 --root=$RPM_BUILD_ROOT
9b3d2ae3 93
8a01110b 94%py_postclean
4c63ce1f
MK
95%endif
96
97%if %{with python3}
98%{__python3} setup.py \
99 build --build-base build-3 \
100 install --skip-build \
101 --optimize=2 \
102 --root=$RPM_BUILD_ROOT
103%endif
8a01110b 104
9b3d2ae3 105%clean
106rm -rf $RPM_BUILD_ROOT
107
4c63ce1f 108%if %{with python2}
9b3d2ae3 109%files
110%defattr(644,root,root,755)
4c63ce1f 111%doc AUTHORS CHANGES LICENSE README
9b3d2ae3 112%attr(755,root,root) %{_bindir}/pybabel
bc10f8db
ER
113%dir %{py_sitescriptdir}/babel
114%{py_sitescriptdir}/babel/*.dat
115%{py_sitescriptdir}/babel/*.py[co]
4c63ce1f
MK
116%dir %{py_sitescriptdir}/babel/localtime
117%{py_sitescriptdir}/babel/localtime/*.py[co]
118
bc10f8db
ER
119%dir %{py_sitescriptdir}/babel/localedata
120# TODO: %lang tag
121%{py_sitescriptdir}/babel/localedata/*.dat
122%dir %{py_sitescriptdir}/babel/messages
123%{py_sitescriptdir}/babel/messages/*.py[co]
8a01110b 124
4c63ce1f
MK
125%if "%{py_ver}" > "2.4"
126%{py_sitescriptdir}/Babel-%{version}-py*.egg-info
127%endif
128%endif
129
130%if %{with python3}
131%files -n python3-%{module}
132%defattr(644,root,root,755)
133%doc AUTHORS CHANGES LICENSE README
134%{py3_sitescriptdir}/%{module}
135%{py3_sitescriptdir}/Babel-%{version}-py*.egg-info
136%endif
137
138%if %{with doc}
8a01110b
ER
139%files apidocs
140%defattr(644,root,root,755)
4c63ce1f 141%doc docs/_build/html/*
8a01110b 142%endif
4c63ce1f 143
This page took 0.091941 seconds and 4 git commands to generate.