Notification time stamped 2021-03-31 17:01:14 UTC
From 8390c78b1afadbfedc24bfa82c774992500ab945 Mon Sep 17 00:00:00 2001
From: Jan Sedlák <jsedlak(a)redhat.com>
Date: Nov 13 2015 11:45:58 +0000
Subject: rebuild because of specfile changes
---
diff --git a/python-flask-restful.remove_q0_testcase.patch
b/python-flask-restful.remove_q0_testcase.patch
new file mode 100644
index 0000000..1a50171
--- /dev/null
+++ b/python-flask-restful.remove_q0_testcase.patch
@@ -0,0 +1,29 @@
+--- tests/test_accept.py.orig 2015-11-13 12:06:18.914003153 +0100
++++ tests/test_accept.py 2015-11-13 12:04:42.786435117 +0100
+@@ -121,26 +121,6 @@
+ assert_equals(res.content_type, 'text/plain')
+
+
+- def test_accept_no_default_match_q0_not_acceptable(self):
+- """
+- q=0 should be considered NotAcceptable,
+- but this depends on werkzeug >= 1.0 which is not yet released
+- so this test is expected to fail until we depend on werkzeug >= 1.0
+- """
+- class Foo(flask_restful.Resource):
+- def get(self):
+- return "data"
+-
+- app = Flask(__name__)
+- api = flask_restful.Api(app, default_mediatype=None)
+-
+- api.add_resource(Foo, '/')
+-
+- with app.test_client() as client:
+- res = client.get('/', headers=[('Accept',
'application/json; q=0')])
+- assert_equals(res.status_code, 406)
+- assert_equals(res.content_type, 'application/json')
+-
+ def test_accept_no_default_accept_highest_quality_of_two(self):
+ class Foo(flask_restful.Resource):
+ def get(self):
diff --git a/python-flask-restful.spec b/python-flask-restful.spec
index e9bc46e..800e6aa 100644
--- a/python-flask-restful.spec
+++ b/python-flask-restful.spec
@@ -4,30 +4,21 @@
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from
distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%endif
-%if (0%{?fedora} > 12)
-%global with_python3 1
-%endif
-
-%global pkgname python-flask-restful
-%global tarball_name flask-restful
+%global srcname flask-restful
+%global sum Simple framework for creating REST APIs for Flask
-Name: python-flask-restful
+Name: python-%{srcname}
Version: 0.3.4
Release: 1%{?dist}
-Summary: Simple framework for creating REST APIs for Flask
+Summary: %{sum}
Group: Development/Languages
License: BSD
-URL:
https://www.github.com/flask-restful/flask-restful/
-Source0:
https://github.com/flask-restful/%{tarball_name}/archive/%{version}.tar.gz
-Patch0: remove_q0_testcase.patch
+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
-
-Requires: python-flask
-Requires: python-six
-Requires: python-aniso8601
-Requires: pytz
# those are needed for tests:
BuildRequires: python-flask
BuildRequires: python-six
@@ -39,20 +30,6 @@ BuildRequires: python-nose
BuildRequires: python-mock
BuildRequires: python-blinker
BuildRequires: python-crypto
-
-%description
-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-flask-restful
-Summary: %{summary}
-Requires: python3-flask
-Requires: python3-six
-Requires: python3-aniso8601
-Requires: python3-pytz
-# those are needed for tests:
BuildRequires: python3-flask
BuildRequires: python3-six
BuildRequires: python3-aniso8601
@@ -64,62 +41,73 @@ BuildRequires: python3-mock
BuildRequires: python3-blinker
BuildRequires: python3-crypto
-%description -n python3-flask-restful
+%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.
+
+%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 %{tarball_name}-%{version}
+%setup -qn %{srcname}-%{version}
rm -rf docs/_themes/.gitignore
-%patch0 -p1
-
-%if 0%{?with_python3}
-rm -rf %{py3dir}
-cp -a . %{py3dir}
-find %{py3dir} -name '*.py' | xargs sed -i
'1s|^#!python|#!%{__python3}|'
-%endif
+%patch0
%build
-%{__python2} setup.py build
-
-%if 0%{?with_python3}
-pushd %{py3dir}
-%{__python3} setup.py build
-popd
-%endif
+%py2_build
+%py3_build
%install
-%{__python2} setup.py install --skip-build --root %{buildroot}
-%if 0%{?with_python3}
-pushd %{py3dir}
-%{__python3} setup.py install --skip-build --root %{buildroot}
-popd
-%endif
+%py2_install
+%py3_install
%check
%{__python2} setup.py test
-%if 0%{?with_python3}
%{__python3} setup.py test
-%endif
-%files
+%files -n python2-%{srcname}
%doc AUTHORS.md README.md examples/ docs/
%license LICENSE
%{python2_sitelib}/*
-%if 0%{?with_python3}
-%files -n python3-flask-restful
+%files -n python3-%{srcname}
%doc AUTHORS.md README.md examples/ docs/
%license LICENSE
%{python3_sitelib}/*
-%endif
%changelog
+* Fri Nov 13 2015 Jan Sedlak <jsedlak(a)redhat.com> - 0.3.4-2
+- change specfile to be more aligned with guidelines
+
* Thu Aug 20 2015 Jan Sedlak <jsedlak(a)redhat.com> - 0.3.4-1
- update version, correct project URL
+
* Tue Jul 07 2015 Jan Sedlak <jsedlak(a)redhat.com> - 0.3.3-1
- package newest version
+
* Wed Jan 22 2014 Jan Sedlak <jsedlak(a)redhat.com> - 0.2.11-1
- initial packaging
diff --git a/remove_q0_testcase.patch b/remove_q0_testcase.patch
deleted file mode 100644
index acc98b3..0000000
--- a/remove_q0_testcase.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From dd42963452e8bb79fb4baef11b47c6e3a41a3491 Mon Sep 17 00:00:00 2001
-From: Garret Raziel <boloomka(a)gmail.com>
-Date: Tue, 7 Jul 2015 16:15:17 +0200
-Subject: [PATCH] remove q=0 testcase
-
----
- tests/test_accept.py | 20 --------------------
- 1 file changed, 20 deletions(-)
-
-diff --git a/tests/test_accept.py b/tests/test_accept.py
-index 7d78118..1f294e9 100644
---- a/tests/test_accept.py
-+++ b/tests/test_accept.py
-@@ -121,26 +121,6 @@ class AcceptTestCase(unittest.TestCase):
- assert_equals(res.content_type, 'text/plain')
-
-
-- def test_accept_no_default_match_q0_not_acceptable(self):
-- """
-- q=0 should be considered NotAcceptable,
-- but this depends on werkzeug >= 1.0 which is not yet released
-- so this test is expected to fail until we depend on werkzeug >= 1.0
-- """
-- class Foo(flask_restful.Resource):
-- def get(self):
-- return "data"
--
-- app = Flask(__name__)
-- api = flask_restful.Api(app, default_mediatype=None)
--
-- api.add_resource(Foo, '/')
--
-- with app.test_client() as client:
-- res = client.get('/', headers=[('Accept',
'application/json; q=0')])
-- assert_equals(res.status_code, 406)
-- assert_equals(res.content_type, 'application/json')
--
- def test_accept_no_default_accept_highest_quality_of_two(self):
- class Foo(flask_restful.Resource):
- def get(self):
---
-2.4.3
-
https://src.fedoraproject.org/rpms/python-flask-restful/c/8390c78b1afadbf...