3 %bcond_with doc # don't build doc
4 %bcond_with tests # do not perform "make test"
5 %bcond_without python2 # CPython 2.x module
6 %bcond_without python3 # CPython 3.x module
8 %define module flask-babel
9 Summary: Extension to Flask that adds i18n and l10n support to any Flask application with the help of babel, pytz and speaklater
10 Summary(pl.UTF-8): Rozszerzenie Flask dodające wsparcie dla i18n i l10n przy użyciu babel, pytz i speklater.
11 # Name must match the python module/package name (as in 'import' statement)
12 Name: python-%{module}
16 Group: Libraries/Python
17 # https://pypi.python.org/packages/source/F/Flask-Babel/Flask-Babel-0.9.tar.gz
18 Source0: https://pypi.python.org/packages/source/F/Flask-Babel/Flask-Babel-%{version}.tar.gz
19 # Source0-md5: 4762e0392303f464d53cbebedfb87ded
20 URL: http://github.com/mitsuhiko/flask-babel
21 BuildRequires: rpm-pythonprov
22 BuildRequires: rpmbuild(macros) >= 1.710
24 BuildRequires: python-distribute
25 BuildRequires: python-speaklater
28 BuildRequires: python3-modules
29 BuildRequires: python3-speaklater
31 Requires: python-jinja2 >= 2.5
32 Requires: python-modules
33 Requires: python-speaklater
35 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38 Adds i18n/l10n support to Flask applications with the help of the
41 # %description -l pl.UTF-8
43 %package -n python3-%{module}
46 Group: Libraries/Python
47 Requires: python3-jinja2 >= 2.5
48 Requires: python3-modules
49 Requires: python3-speaklater
51 %description -n python3-%{module}
52 Adds i18n/l10n support to Flask applications with the help of the
55 # %description -n python3-%{module} -l pl.UTF-8
58 Summary: %{module} API documentation
59 Summary(pl.UTF-8): Dokumentacja API %{module}
63 API documentation for %{module}.
65 %description apidocs -l pl.UTF-8
66 Dokumentacja API %{module}.
69 %setup -q -n Flask-Babel-%{version}
73 %py_build %{?with_tests:test}
77 %py3_build %{?with_tests:test}
83 rm -rf _build/html/_sources
87 rm -rf $RPM_BUILD_ROOT
100 rm -rf $RPM_BUILD_ROOT
104 %defattr(644,root,root,755)
106 %{py_sitescriptdir}/flask_babel
107 %if "%{py_ver}" > "2.4"
108 %{py_sitescriptdir}/Flask_Babel-%{version}-py*.egg-info
113 %files -n python3-%{module}
114 %defattr(644,root,root,755)
116 %{py3_sitescriptdir}/flask_babel
117 %{py3_sitescriptdir}/Flask_Babel-%{version}-py*.egg-info
122 %defattr(644,root,root,755)
123 %doc docs/_build/html/*