]> git.pld-linux.org Git - packages/python-flask-babel.git/blame - python-flask-babel.spec
automatic change: use py_build/py_install macros
[packages/python-flask-babel.git] / python-flask-babel.spec
CommitLineData
76ebd225
MK
1#
2# Conditional build:
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
7
8%define module flask-babel
9Summary: Extension to Flask that adds i18n and l10n support to any Flask application with the help of babel, pytz and speaklater
10Summary(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)
12Name: python-%{module}
13Version: 0.9
df52346c 14Release: 3
76ebd225
MK
15License: BSD
16Group: Libraries/Python
17# https://pypi.python.org/packages/source/F/Flask-Babel/Flask-Babel-0.9.tar.gz
18Source0: https://pypi.python.org/packages/source/F/Flask-Babel/Flask-Babel-%{version}.tar.gz
19# Source0-md5: 4762e0392303f464d53cbebedfb87ded
20URL: http://github.com/mitsuhiko/flask-babel
21BuildRequires: rpm-pythonprov
22BuildRequires: rpmbuild(macros) >= 1.219
23%if %{with python2}
24BuildRequires: python-distribute
25BuildRequires: python-speaklater
26%endif
27%if %{with python3}
28BuildRequires: python3-distribute
29BuildRequires: python3-modules
30BuildRequires: python3-speaklater
31%endif
32Requires: python-jinja2 >= 2.5
33Requires: python-modules
34Requires: python-speaklater
35BuildArch: noarch
36BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38%description
39Adds i18n/l10n support to Flask applications with the help of the
40Babel library.
41
42# %description -l pl.UTF-8
43
44%package -n python3-%{module}
45Summary: -
46Summary(pl.UTF-8): -
47Group: Libraries/Python
48Requires: python3-jinja2 >= 2.5
49Requires: python3-modules
50Requires: python3-speaklater
51
52%description -n python3-%{module}
53Adds i18n/l10n support to Flask applications with the help of the
54Babel library.
55
56# %description -n python3-%{module} -l pl.UTF-8
57
58%package apidocs
59Summary: %{module} API documentation
60Summary(pl.UTF-8): Dokumentacja API %{module}
61Group: Documentation
62
63%description apidocs
64API documentation for %{module}.
65
66%description apidocs -l pl.UTF-8
67Dokumentacja API %{module}.
68
69%prep
70%setup -q -n Flask-Babel-%{version}
71
72%build
73%if %{with python2}
13f1dcb6 74%py_build %{?with_tests:test}
76ebd225
MK
75%endif
76
77%if %{with python3}
13f1dcb6 78%py3_build %{?with_tests:test}
76ebd225
MK
79%endif
80
81%if %{with doc}
82cd docs
83%{__make} -j1 html
84rm -rf _build/html/_sources
85%endif
86
87%install
88rm -rf $RPM_BUILD_ROOT
89
90%if %{with python2}
13f1dcb6 91%py_install
76ebd225
MK
92
93%py_postclean
94%endif
95
96%if %{with python3}
13f1dcb6 97%py3_install
76ebd225
MK
98%endif
99
100%clean
101rm -rf $RPM_BUILD_ROOT
102
103%if %{with python2}
104%files
105%defattr(644,root,root,755)
106%doc LICENSE README
107%{py_sitescriptdir}/flask_babel
108%if "%{py_ver}" > "2.4"
109%{py_sitescriptdir}/Flask_Babel-%{version}-py*.egg-info
110%endif
111%endif
112
113%if %{with python3}
114%files -n python3-%{module}
115%defattr(644,root,root,755)
116%doc LICENSE README
117%{py3_sitescriptdir}/flask_babel
118%{py3_sitescriptdir}/Flask_Babel-%{version}-py*.egg-info
119%endif
120
121%if %{with doc}
122%files apidocs
123%defattr(644,root,root,755)
124%doc docs/_build/html/*
125%endif
This page took 0.447284 seconds and 4 git commands to generate.