%global pypi_name Flask-PyMongo Name: python-flask-pymongo Version: 0.5.1 Release: 1%{?dist} Summary: PyMongo support for Flask applications License: BSD URL: http://flask-pymongo.readthedocs.org/ Source0: https://files.pythonhosted.org/packages/source/F/%{pypi_name}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch BuildRequires: python-setuptools BuildRequires: python2-devel BuildRequires: python-sphinx BuildRequires: python3-setuptools BuildRequires: python3-devel %description PyMongo support for Flask applications. %package -n python2-flask-pymongo Summary: PyMongo support for Flask applications %{?python_provide:%python_provide python2-flask-pymongo} Requires: python-flask >= 0.8 Requires: python-pymongo >= 2.4 %description -n python2-flask-pymongo PyMongo support for Flask applications. %package -n python3-flask-pymongo Summary: PyMongo support for Flask applications %{?python_provide:%python_provide python3-flask-pymongo} Requires: python3-flask >= 0.8 Requires: python3-pymongo >= 2.4 %description -n python3-flask-pymongo PyMongo support for Flask applications. %package -n python-flask-pymongo-doc Summary: Flask-PyMongo documentation %description -n python-flask-pymongo-doc Documentation for Flask-PyMongo %prep %autosetup -n %{pypi_name}-%{version} rm -rf %{pypi_name}.egg-info %build %py2_build %py3_build # generate html docs sphinx-build docs html # remove the sphinx-build leftovers rm -rf html/.{doctrees,buildinfo} rm -rf %{python2_sitelib}/tests %install %py3_install %py2_install %check %{__python2} setup.py test %{__python3} setup.py test %files -n python2-flask-pymongo %license docs/_themes/LICENSE %doc README.md %{python2_sitelib}/flask_pymongo %{python2_sitelib}/Flask_PyMongo-%{version}-py*egg-info %files -n python3-flask-pymongo %license docs/_themes/LICENSE %doc README.md %{python3_sitelib}/flask_pymongo %{python3_sitelib}/Flask_PyMongo-%{version}-py*egg-info %files -n python-flask-pymongo-doc %doc html %changelog * Sun Jun 18 2017 David Hannequin - 0.5.1-1 - Initial package.