%global pypi_name Flask-PyMongo Name: python-%{pypi_name} Version: 0.4.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-%{pypi_name} Summary: PyMongo support for Flask applications %{?python_provide:%python_provide python2-%{pypi_name}} Requires: python-flask >= 0.8 Requires: python-pymongo >= 2.4 %description -n python2-%{pypi_name} PyMongo support for Flask applications. %package -n python3-%{pypi_name} Summary: PyMongo support for Flask applications %{?python_provide:%python_provide python3-%{pypi_name}} Requires: python3-flask >= 0.8 Requires: python3-pymongo >= 2.4 %description -n python3-%{pypi_name} PyMongo support for Flask applications. %package -n python-%{pypi_name}-doc Summary: Flask-PyMongo documentation %description -n python-%{pypi_name}-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 %{__rm} -rf %{buildroot}%{python2_sitelib}/tests %{__rm} -rf %{buildroot}%{python3_sitelib}/tests %files -n python2-%{pypi_name} %license docs/_themes/LICENSE %doc README.md %{python2_sitelib}/flask_pymongo %{python2_sitelib}/Flask_PyMongo-%{version}-py*egg-info %files -n python3-%{pypi_name} %license docs/_themes/LICENSE %doc README.md %{python3_sitelib}/flask_pymongo %{python3_sitelib}/Flask_PyMongo-%{version}-py*egg-info %files -n python-%{pypi_name}-doc %doc html %changelog * Thu Oct 27 2016 David Hannequin - 0.4.1-1 - Initial package.