]> git.pld-linux.org Git - packages/python-babel.git/blame - python-babel.spec
Disable tests, broken for 'local' timezone
[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:
73c67f0f 6%bcond_without doc # don't build doc
21523b25 7%bcond_with tests # do not perform "make test"
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}
4db81d45
JK
15Version: 2.1.1
16Release: 1
9b3d2ae3 17License: BSD-like
18Group: Development/Languages/Python
73c67f0f
JB
19#Source0Download: https://pypi.python.org/pypi/Babel
20Source0: https://pypi.python.org/packages/source/B/Babel/Babel-%{version}.tar.gz
4db81d45 21# Source0-md5: cab63d158ceed3a809703711cfb8cbd5
006ed0f7 22Patch0: tz.patch
fd18bd52 23URL: http://babel.pocoo.org/
4c63ce1f 24%if %{with python2}
9b3d2ae3 25BuildRequires: python-devel
4fcdb98b 26BuildRequires: python-devel-tools
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}
33BuildRequires: python3-devel
4761453f 34BuildRequires: python3-devel-tools
fd18bd52 35BuildRequires: python3-setuptools
4c63ce1f 36BuildRequires: python3-modules
4761453f 37BuildRequires: python3-pytz
4c63ce1f 38%endif
8340e96b 39%{?with_doc:BuildRequires: sphinx-pdg}
8b5a0641 40Requires: python-modules
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
MK
59Group: Libraries/Python
60Requires: python3-modules
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
100rm -rf _build/html/_sources
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
73c67f0f
JB
118find $RPM_BUILD_ROOT%{py_sitescriptdir}/babel/localedata -name '*.dat' | \
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
122find $RPM_BUILD_ROOT%{py3_sitescriptdir}/babel/localedata -name '*.dat' | \
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)
4c63ce1f 132%doc AUTHORS CHANGES LICENSE README
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]
bc10f8db 139%dir %{py_sitescriptdir}/babel/localedata
73c67f0f 140%{py_sitescriptdir}/babel/localedata/root.dat
bc10f8db
ER
141%dir %{py_sitescriptdir}/babel/messages
142%{py_sitescriptdir}/babel/messages/*.py[co]
8a01110b 143
4c63ce1f
MK
144%if "%{py_ver}" > "2.4"
145%{py_sitescriptdir}/Babel-%{version}-py*.egg-info
146%endif
147%endif
148
149%if %{with python3}
73c67f0f 150%files -n python3-%{module} -f py3.lang
4c63ce1f
MK
151%defattr(644,root,root,755)
152%doc AUTHORS CHANGES LICENSE README
73c67f0f
JB
153%attr(755,root,root) %{_bindir}/pybabel3
154%dir %{py3_sitescriptdir}/babel
155%{py3_sitescriptdir}/babel/__pycache__
156%{py3_sitescriptdir}/babel/global.dat
157%{py3_sitescriptdir}/babel/*.py
158%{py3_sitescriptdir}/babel/localtime
159%dir %{py3_sitescriptdir}/babel/localedata
160%{py3_sitescriptdir}/babel/localedata/root.dat
161%{py3_sitescriptdir}/babel/messages
4c63ce1f
MK
162%{py3_sitescriptdir}/Babel-%{version}-py*.egg-info
163%endif
164
165%if %{with doc}
8a01110b
ER
166%files apidocs
167%defattr(644,root,root,755)
4c63ce1f 168%doc docs/_build/html/*
8a01110b 169%endif
This page took 0.149111 seconds and 4 git commands to generate.