%global mod_name Flask-WTF %global with_python3 0 Name: python-flask-wtf Version: 0.10.0 Release: 3%{?dist} Summary: Simple integration of Flask and WTForms Group: Development/Libraries License: BSD URL: https://github.com/lepture/flask-wtf Source0: http://pypi.python.org/packages/source/F/%{mod_name}/%{mod_name}-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: python-wtforms > 1.0 BuildRequires: python-setuptools BuildRequires: python-flask BuildRequires: python-nose BuildRequires: python-flask-babel %if 0%{?with_python3} BuildRequires: python3-devel BuildRequires: python3-wtforms > 1.0 BuildRequires: python3-setuptools BuildRequires: python3-flask BuildRequires: python3-nose # check can't work with python3 until builds for python3-flask-babel are available #BuildRequires: python3-flask-babel %endif Requires: python-wtforms > 1.0 %if 0%{?with_python3} Requires: python-wtforms > 1.0 %endif %description Flask-WTF offers simple integration with WTForms. This integration includes optional CSRF handling for greater security. %if 0%{?with_python3} %package -n python3-flask-wtf Summary: Simple integration of Flask and WTForms %description -n python3-flask-wtf Flask-WTF offers simple integration with WTForms. This integration includes optional CSRF handling for greater security. %endif %prep %setup -q -n %{mod_name}-%{version} rm -f docs/index.rst.orig %if 0%{?with_python3} rm -rf %{py3dir} cp -a . %{py3dir} %endif %build %{__python2} setup.py build %if 0%{?with_python3} pushd %{py3dir} %{__python3} setup.py build popd %endif # disabling check in rawhide and f21 until RHBZ 1105819 is fixed #%check #%{__python2} setup.py test # check can't work with python3 until builds for python3-flask-babel are available #%if 0%{?with_python3} #pushd %{py3dir} #%{__python3} setup.py test #popd #%endif %install %{__python2} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT %if 0%{?with_python3} pushd %{py3dir} %{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT popd %endif %files %doc docs/ LICENSE PKG-INFO %{python2_sitelib}/*.egg-info/ %{python2_sitelib}/flask_wtf/ %if 0%{?with_python3} %files -n python3-flask-wtf %doc docs/ LICENSE PKG-INFO %{python3_sitelib}/*.egg-info/ %{python3_sitelib}/flask_wtf/ %endif %changelog * Thu Jun 18 2015 Fedora Release Engineering - 0.10.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Thu Jul 17 2014 Tim Flink 0.10.0-2 - Adding missing BuildRequires for %check - disabling %check on python3 due to missing builds - disabling %check for rawhide and f21 due to RHBZ 1105819 * Thu Jul 17 2014 Tim Flink 0.10.0-1 - Adding support for python-wtforms >= 2.0 to fix RHBZ 1120888 - added %check * Wed May 21 2014 Praveen Kumar 0.9.5-1 - Updated to new source - Add python3 support * Sun Aug 04 2013 Fedora Release Engineering - 0.8-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Thu Feb 14 2013 Fedora Release Engineering - 0.8-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Tue Oct 09 2012 Tim Flink - 0.8-1 - Upgrade to upstream 0.8 * Sat Jul 21 2012 Fedora Release Engineering - 0.5.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Wed Jul 4 2012 Praveen Kumar - 0.5.2-3 - Added python-wtforms as requires. * Sat Jan 14 2012 Fedora Release Engineering - 0.5.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Thu Jul 21 2011 Praveen Kumar - 0.5.2-1 - Initial RPM release