Blob Blame History Raw
%if 0%{?fedora}
%global with_python3 1
%endif

%global srcname Flask-Mako
%global eggname Flask_Mako

Name:               python-flask-mako
Version:            0.4
Release:            2%{?dist}
Summary:            Mako templating support for Flask applications
Group:              Development/Libraries
License:            BSD
URL:                http://pypi.python.org/pypi/%{srcname}
Source0:            http://pypi.python.org/packages/source/F/%{srcname}/%{srcname}-%{version}.tar.gz

BuildArch:          noarch

BuildRequires:      python2-devel
BuildRequires:      python2-setuptools
BuildRequires:      python-flask
BuildRequires:      python-mako

%if 0%{?with_python3}
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
BuildRequires:  python3-flask
BuildRequires:  python3-mako
%endif

%description
This extension for the Flask micro web framework allows developers
to use Mako Templates instead of the default Jinja2 templating engine.


%package -n python2-flask-mako
Summary:            Mako templating support for Flask applications
%{?python_provide:%python_provide python2-flask-mako}

Requires:           python-flask
Requires:           python-mako

%description -n python2-flask-mako
This extension for the Flask micro web framework allows developers
to use Mako Templates instead of the default Jinja2 templating engine.

%if 0%{?with_python3}
%package -n python3-flask-mako
Summary:            Mako templating support for Flask applications
%{?python_provide:%python_provide python3-flask-mako}

Requires:           python3-flask
Requires:           python3-mako

%description -n python3-flask-mako
This extension for the Flask micro web framework allows developers
to use Mako Templates instead of the default Jinja2 templating engine.
%endif


%prep
%autosetup -n %{srcname}-%{version}

%build
%py2_build
%if 0%{?with_python3}
%py3_build
%endif

%install
%py2_install
%if 0%{?with_python3}
%py3_install
%endif

%files -n python2-flask-mako
%doc PKG-INFO
%{python2_sitelib}/flask_mako.py*
%{python2_sitelib}/%{eggname}-%{version}*

%if 0%{?with_python3}
%files -n python3-flask-mako
%doc PKG-INFO
%{python3_sitelib}/flask_mako.py*
%{python3_sitelib}/%{eggname}-%{version}*
%{python3_sitelib}/__pycache__/flask_mako*
%endif

%changelog
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4-2
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

* Fri Feb 19 2016 Ralph Bean <rbean@redhat.com> - 0.4-1
- new version

* Fri Feb 19 2016 Ralph Bean <rbean@redhat.com> - 0.3-6
- Add conditional to python3 files section.

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.3-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Sat Nov 14 2015 Ralph Bean <rbean@redhat.com> - 0.3-4
- Added python3 subpackage and modernized python macros.

* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Wed Feb 12 2014 Ralph Bean <rbean@redhat.com> - 0.3-1
- Latest upstream.
- Reenabled tests.

* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Thu Apr 04 2013 Ralph Bean <rbean@redhat.com> - 0.2-1
- Initial package for Fedora