Notification time stamped 2021-03-31 17:01:14 UTC
From 07fa7631af4cf14f4165244250601f537ae01dc2 Mon Sep 17 00:00:00 2001
From: Ralph Bean <rbean(a)redhat.com>
Date: Oct 17 2016 20:18:03 +0000
Subject: Conditionalize python3 package for EPEL7.
---
diff --git a/python-flask-restful.spec b/python-flask-restful.spec
index f50b380..cc6a9fb 100644
--- a/python-flask-restful.spec
+++ b/python-flask-restful.spec
@@ -4,12 +4,16 @@
%{!?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: 3%{?dist}
+Release: 4%{?dist}
Summary: %{sum}
Group: Development/Languages
@@ -30,6 +34,8 @@ 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
@@ -40,6 +46,7 @@ BuildRequires: python3-nose
BuildRequires: python3-mock
BuildRequires: python3-blinker
BuildRequires: python3-crypto
+%endif
%description
Flask-RESTful is Python extension for Flask that adds support
@@ -59,6 +66,7 @@ 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
@@ -71,6 +79,7 @@ Requires: python3-pytz
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}
@@ -79,27 +88,38 @@ rm -rf docs/_themes/.gitignore
%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
+* Mon Oct 17 2016 Ralph Bean <rbean(a)redhat.com> - 0.3.5-4
+- Conditionalize python3 package for EPEL7.
+
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> -
0.3.5-3
-
https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_...
https://src.fedoraproject.org/rpms/python-flask-restful/c/07fa7631af4cf14...