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