%if 0%{?rhel} && 0%{?rhel} <= 6 %{!?__python2: %global __python2 /usr/bin/python} %{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} %{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} %endif %if 0%{?fedora} %global with_python3 1 %endif %global srcname flask-restful %global sum Simple framework for creating REST APIs for Flask Name: python-%{srcname} Version: 0.3.5 Release: 7%{?dist} Summary: %{sum} Group: Development/Languages License: BSD URL: https://www.github.com/%{srcname}/%{srcname}/ Source0: https://github.com/%{srcname}/%{srcname}/archive/%{version}.tar.gz Patch0: python-flask-restful.remove_q0_testcase.patch BuildArch: noarch # those are needed for tests: BuildRequires: python-flask BuildRequires: python-six BuildRequires: python-aniso8601 BuildRequires: pytz BuildRequires: python2-devel BuildRequires: python-setuptools BuildRequires: python-nose BuildRequires: python-mock BuildRequires: python-blinker BuildRequires: python-crypto %if 0%{?with_python3} BuildRequires: python3-flask BuildRequires: python3-six BuildRequires: python3-aniso8601 BuildRequires: python3-pytz BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-nose BuildRequires: python3-mock BuildRequires: python3-blinker BuildRequires: python3-crypto %endif %description Flask-RESTful is Python extension for Flask that adds support for quickly building REST APIs. It is a lightweight abstraction that works with your existing ORM/libraries. %package -n python2-%{srcname} Summary: %{sum} Requires: python-flask Requires: python-six Requires: python-aniso8601 Requires: pytz %{?python_provide:%python_provide python2-%{srcname}} %description -n python2-%{srcname} Flask-RESTful is Python 2 extension for Flask that adds support for quickly building REST APIs. It is a lightweight abstraction that works with your existing ORM/libraries. %if 0%{?with_python3} %package -n python3-%{srcname} Summary: %{sum} Requires: python3-flask Requires: python3-six Requires: python3-aniso8601 Requires: python3-pytz %{?python_provide:%python_provide python3-%{srcname}} %description -n python3-%{srcname} Flask-RESTful is Python 3 extension for Flask that adds support for quickly building REST APIs. It is a lightweight abstraction that works with your existing ORM/libraries. %endif %prep %setup -qn %{srcname}-%{version} rm -rf docs/_themes/.gitignore %patch0 %build %py2_build %if 0%{?with_python3} %py3_build %endif %install %py2_install %if 0%{?with_python3} %py3_install %endif %check %{__python2} setup.py test %if 0%{?with_python3} %{__python3} setup.py test %endif %files -n python2-%{srcname} %doc AUTHORS.md README.md examples/ docs/ %license LICENSE %{python2_sitelib}/* %if 0%{?with_python3} %files -n python3-%{srcname} %doc AUTHORS.md README.md examples/ docs/ %license LICENSE %{python3_sitelib}/* %endif %changelog * Thu Jul 27 2017 Fedora Release Engineering - 0.3.5-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Sat Feb 11 2017 Fedora Release Engineering - 0.3.5-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Mon Dec 19 2016 Miro HronĨok - 0.3.5-5 - Rebuild for Python 3.6 * Mon Oct 17 2016 Ralph Bean - 0.3.5-4 - Conditionalize python3 package for EPEL7. * Tue Jul 19 2016 Fedora Release Engineering - 0.3.5-3 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages * Thu Feb 04 2016 Fedora Release Engineering - 0.3.5-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Fri Dec 11 2015 Jan Sedlak - 0.3.5-1 - update to newest version * Fri Nov 13 2015 Jan Sedlak - 0.3.4-3 - change specfile to be more aligned with guidelines * Tue Nov 10 2015 Fedora Release Engineering - 0.3.4-2 - Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 * Thu Aug 20 2015 Jan Sedlak - 0.3.4-1 - update version, correct project URL * Tue Jul 07 2015 Jan Sedlak - 0.3.3-1 - package newest version * Wed Jan 22 2014 Jan Sedlak - 0.2.11-1 - initial packaging