diff --git a/0.3.8.tar.gz b/0.3.8.tar.gz deleted file mode 100644 index c6a8847911741339d097f1f3fe9311321edbd350..0000000000000000000000000000000000000000 Binary files a/0.3.8.tar.gz and /dev/null differ diff --git a/Fix-test-api-traceback-error.patch b/Fix-test-api-traceback-error.patch new file mode 100644 index 0000000000000000000000000000000000000000..85f6a9a03e6bacecaf676dc1bcfea257e03308d4 --- /dev/null +++ b/Fix-test-api-traceback-error.patch @@ -0,0 +1,25 @@ +From d9fbcf5a2f0e872c4c821acc22eb7217f61aadfb Mon Sep 17 00:00:00 2001 +From: sean-lau +Date: Mon, 24 May 2021 16:41:14 +0800 +Subject: [PATCH] [PATCH] Fix test api traceback error + +--- + tests/test_api.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/test_api.py b/tests/test_api.py +index 26447ae..dc4ee4d 100644 +--- a/tests/test_api.py ++++ b/tests/test_api.py +@@ -784,7 +784,7 @@ class APITestCase(unittest.TestCase): + allow = ', '.join(set(resp.headers.get_all('Allow'))) + allow = set(method.strip() for method in allow.split(',')) + self.assertEquals(allow, +- set(['HEAD', 'OPTIONS'] + HelloWorld.methods)) ++ {'HEAD', 'OPTIONS'}.union(HelloWorld.methods)) + + def test_exception_header_forwarded(self): + """Test that HTTPException's headers are extended properly""" +-- +2.27.0 + diff --git a/Flask-RESTful-0.3.6.tar.gz b/Flask-RESTful-0.3.6.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..f56491c27227a2ed7f60bb6d0834c764474225f9 Binary files /dev/null and b/Flask-RESTful-0.3.6.tar.gz differ diff --git a/python-flask-restful.spec b/python-flask-restful.spec index ecf36da113ec3ed6f25cc52fcad63176b4fabf5f..692def3f04bc9ee6dd42d8e903501595e4abbfad 100644 --- a/python-flask-restful.spec +++ b/python-flask-restful.spec @@ -1,59 +1,99 @@ -Name: python-flask-restful -Version: 0.3.8 -Release: 2 -Summary: Framework for creating REST APIs -License: BSD -URL: https://www.github.com/flask-restful/flask-restful/ -Source0: https://github.com/flask-restful/flask-restful/archive/%{version}.tar.gz +%global _empty_manifest_terminate_build 0 +Name: python-flask-restful +Version: 0.3.6 +Release: 2 +Summary: Simple framework for creating REST APIs +License: BSD +URL: https://www.github.com/flask-restful/flask-restful/ +Source0: https://files.pythonhosted.org/packages/20/f1/14a62bba209ae189e5c5fa33d5e0b7a4b5969488fa71fd3b8b323860bfc8/Flask-RESTful-0.3.6.tar.gz +BuildArch: noarch Patch6000: backport-Fix-testsuite-for-werkzeug-1.x.patch - -BuildArch: noarch -BuildRequires: git gcc python3-pytz python3-setuptools python3-nose python3-mock python3-blinker -BuildRequires: python3-flask python3-six python3-aniso8601 python3-pytz python3-devel python3-crypto +Patch6001: Fix-test-api-traceback-error.patch %description -Flask-RESTful provides the building blocks for creating a REST API. +Flask-RESTful is an extension for Flask that adds support for quickly +building REST APIs. It is a lightweight abstraction that works with +your existing ORM/libraries. Flask-RESTful encourages best practices +with minimal setup. If you are familiar with Flask, Flask-RESTful should +be easy to pick up. + + +%package -n python2-flask-restful +Summary: Simple framework for creating REST APIs +Provides: python2-flask-restful +BuildRequires: python2-pbr +BuildRequires: python2-devel +BuildRequires: python2-flask +BuildRequires: python2-setuptools +BuildRequires: python2-nose +BuildRequires: python2-werkzeug +BuildRequires: python2-mock +BuildRequires: python2-blinker +%description -n python2-flask-restful +Flask-RESTful is an extension for Flask that adds support for quickly +building REST APIs. It is a lightweight abstraction that works with +your existing ORM/libraries. Flask-RESTful encourages best practices +with minimal setup. If you are familiar with Flask, Flask-RESTful should +be easy to pick up. -%package -n python3-flask-restful -Summary: Framework for creating REST APIs -Requires: python3-flask python3-six python3-aniso8601 python3-pytz -%{?python_provide:%python_provide python3-flask-restful} -%description -n python3-flask-restful -Flask-RESTful is Python 3 extension for Flask that adds support -for quickly building REST APIs. +%package help +Summary: Development documents and examples for Flask-RESTful +Provides: python2-flask-restful-doc +%description help +Flask-RESTful is an extension for Flask that adds support for quickly +building REST APIs. It is a lightweight abstraction that works with +your existing ORM/libraries. Flask-RESTful encourages best practices +with minimal setup. If you are familiar with Flask, Flask-RESTful should +be easy to pick up. + %prep -%autosetup -n flask-restful-%{version} -p1 -rm -rf docs/_themes/.gitignore +%autosetup -n Flask-RESTful-0.3.6 -p1 %build -%py3_build +%py2_build %install -%py3_install +%py2_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . %check -%{__python3} setup.py test +%{__python2} setup.py test -%files -n python3-flask-restful -%doc AUTHORS.md README.md examples/ docs/ -%license LICENSE -%{python3_sitelib}/* +%files -n python2-flask-restful -f filelist.lst +%dir %{python2_sitelib}/* -%changelog -* Thu Feb 18 2021 shixuantong - 0.3.8-2 -- Fix testsuite for werkzeug 1.x +%files help -f doclist.lst +%{_docdir}/* -* Tue Feb 2 2021 liudabo - 0.3.8-1 -- upgrade version to 0.3.8 - -* Thu Oct 20 2020 tianwei - 0.3.6-11 -- delete python2 - -* Tue Feb 18 2020 Buildteam - 0.3.6-10 -- Fixbug in patching - -* Fri Nov 8 2019 Buildteam - 0.3.6-9 -- Package Initialization +%changelog +* Tue Jun 1 2021 huangtianhua +- Adds BuildRequires python2-pbr to make obs success +* Tue May 11 2021 OpenStack_SIG +- Package Spec generated