diff --git a/SPECS/python-webob.spec b/SPECS/python-webob.spec index c98d24c..ba3d8b2 100644 --- a/SPECS/python-webob.spec +++ b/SPECS/python-webob.spec @@ -1,130 +1,217 @@ -%if 0%{?fedora} -%global with_python3 1 -%{!?py3ver: %global py3ver %(%{__python3} -c "import sys ; print(sys.version[:3])")} -%endif +%{?python_enable_dependency_generator} +%global with_tests 1 -%{!?py2ver: %global py2ver %(%{__python} -c "import sys ; print sys.version[:3]")} +%global desc WebOb provides wrappers around the WSGI request environment, and an object to \ +help create WSGI responses. The objects map much of the specified behavior of \ +HTTP, including header parsing and accessors for other standard parts of the \ +environment. -%global modname webob Name: python-webob Summary: WSGI request and response object -Version: 1.2.3 -Release: 7%{?dist} +Version: 1.8.6 +Release: 3%{?dist} License: MIT -Group: System Environment/Libraries -URL: http://pythonpaste.org/webob/ -Source0: http://pypi.python.org/packages/source/W/WebOb/WebOb-%{version}.tar.gz -Source1: README.Fedora - -# https://github.com/Pylons/webob/issues/75 -# Fix build/test issue on python 3 -Patch1: webob-1.2.3-test-headers2-fix.patch -# Fix the generation of the hash of the message body, in fips mode -# Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=976661 -Patch2: fix-fips-hash-generation.patch +URL: https://webob.org +Source0: %pypi_source WebOb + +# On Python 3.9 the threading.Thread.isAlive() was removed in favor of threading.Thread.is_alive() +# See: https://bugs.python.org/issue37804 +# https://github.com/Pylons/webob/pull/410 +Patch0: fix-python39-compat.patch BuildArch: noarch -BuildRequires: python2-devel -BuildRequires: python-setuptools -BuildRequires: python-nose -BuildRequires: python-dtopt -BuildRequires: python-tempita -BuildRequires: python-webtest - -%if 0%{?with_python3} + + BuildRequires: python3-devel BuildRequires: python3-setuptools +%if 0%{?with_tests} BuildRequires: python3-nose -%endif +BuildRequires: python3-pytest +%endif # with_tests -Provides: python-webob1.2 = %{version}-%{release} -Obsoletes: python-webob1.2 < 1.2.3-4 %description -WebOb provides wrappers around the WSGI request environment, and an object to -help create WSGI responses. The objects map much of the specified behavior of -HTTP, including header parsing and accessors for other standard parts of the -environment. +%{desc} + -%if 0%{?with_python3} %package -n python3-webob -Summary: WSGI request and response object -Group: System Environment/Libraries +Summary: %{summary} +Provides: python3-webob1.2 = %{version}-%{release} +Obsoletes: python3-webob1.2 < 1.2.3-7 + +%{?python_provide:%python_provide python3-webob} -Requires: python3 %description -n python3-webob -WebOb provides wrappers around the WSGI request environment, and an object to -help create WSGI responses. The objects map much of the specified behavior of -HTTP, including header parsing and accessors for other standard parts of the -environment. -%endif +%{desc} %prep %setup -q -n WebOb-%{version} -cp -p %{SOURCE1} . # Disable performance_test, which requires repoze.profile, which isn't # in Fedora. %{__rm} -f tests/performance_test.py -%patch1 -p1 -b .test_headers2 -%patch2 -p1 +# Remove an empty unneeded file that is there for scm purposes. +rm docs/_static/.empty -%if 0%{?with_python3} -rm -rf %{py3dir} -cp -a . %{py3dir} -%endif +%patch0 -p1 %build -%{__python} setup.py build - -%if 0%{?with_python3} -pushd %{py3dir} -%{__python3} setup.py build -popd -%endif +%py3_build %install -%if 0%{?with_python3} -pushd %{py3dir} -%{__python3} setup.py install --skip-build --root %{buildroot} -#%{__chmod} 0644 %{buildroot}%{python3_sitelib}/WebOb-%{version}-*.egg/%{modname}/*.py -popd -%endif - -%{__mkdir} -p %{buildroot}%{python_sitelib} -%{__python} setup.py install --skip-build --root %{buildroot} -#%{__chmod} 0644 %{buildroot}%{python_sitelib}/WebOb-%{version}-*.egg/%{modname}/*.py +%py3_install %check -%{__python} setup.py test +%if 0%{?with_tests} +export PYTHONPATH=%{buildroot}%{python3_sitelib} +py.test-3 tests +%endif # with_tests -%if 0%{?with_python3} -pushd %{py3dir} -%{__python3} setup.py test -popd -%endif - -%files -%doc docs/* README.Fedora -%{python_sitelib}/webob/ -%{python_sitelib}/WebOb-%{version}-py%{py2ver}.egg-info - -%if 0%{?with_python3} %files -n python3-webob -%doc docs/* README.Fedora +%license docs/license.txt +%doc docs/* %{python3_sitelib}/webob/ -%{python3_sitelib}/WebOb-%{version}-py%{py3ver}.egg-info -%endif +%{python3_sitelib}/WebOb-%{version}-py%{python3_version}.egg-info %changelog -* Wed Jan 25 2017 Charalampos Stratakis - 1.2.3-7 -- Fix hash generation of message body in fips mode -Resolves: rhbz#976661 +* Wed Jul 29 2020 Fedora Release Engineering - 1.8.6-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Mon May 25 2020 Miro Hrončok - 1.8.6-2 +- Rebuilt for Python 3.9 + +* Sun Mar 22 2020 Carl George - 1.8.6-1 +- Latest upstream rhbz#1793857 + +* Thu Jan 30 2020 Fedora Release Engineering - 1.8.5-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Tue Jan 14 2020 Charalampos Stratakis - 1.8.5-5 +- Fix Python 3.9 compatibility + +* Mon Sep 09 2019 Miro Hrončok - 1.8.5-4 +- Subpackage python2-webob has been removed + See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal + +* Sat Aug 17 2019 Miro Hrončok - 1.8.5-3 +- Rebuilt for Python 3.8 + +* Fri Jul 26 2019 Fedora Release Engineering - 1.8.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Fri Feb 08 2019 Javier Peña - 1.8.5-1 +- Update to 1.8.5 + +* Sat Feb 02 2019 Fedora Release Engineering - 1.8.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Sat Jul 14 2018 Fedora Release Engineering - 1.8.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Fri Jul 06 2018 Matthias Runge - 1.8.2-1 +- update to 1.8.2 (rhbz#1564125) + +* Sun Jun 17 2018 Miro Hrončok - 1.8.1-2 +- Rebuilt for Python 3.7 + +* Tue May 29 2018 Alfredo Moralejo - 1.8.1-1 +- Update to upstream version 1.8.1. + +* Wed Feb 28 2018 Iryna Shcherbina - 1.7.4-3 +- Update Python 2 dependency declarations to new packaging standards + (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) + +* Fri Feb 09 2018 Fedora Release Engineering - 1.7.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Mon Dec 18 2017 Kevin Fenzi - 1.7.4-1 +- Update to 1.7.4. Fixes bug #1515821 + +* Fri Sep 29 2017 Troy Dawson - 1.7.3-4 +- Cleanup spec file conditionals + +* Thu Jul 27 2017 Fedora Release Engineering - 1.7.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Wed Jul 12 2017 Randy Barlow - 1.7.3-2 +- Depend on python2- versions of nose and setuptools. + +* Wed Jul 12 2017 Randy Barlow - 1.7.3-1 +- Update to 1.7.3 (#1466976). +- Provide python2-webob. +- Use the license macro to mark the license file. +- Remove commented code. +- Remove an empty docs file. + +* Sat Mar 25 2017 Kevin Fenzi - 1.7.2-1 +- Update to 1.7.2. Fixes bug #1432922 + +* Sat Feb 25 2017 Kevin Fenzi - 1.7.1-1 +- Update to 1.7.1. Fixes bug #1413950 + +* Sat Feb 11 2017 Fedora Release Engineering - 1.7.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Wed Dec 28 2016 Kevin Fenzi - 1.7.0-1 +- Update to 1.7.0. Fixes bug #1408197 + +* Mon Dec 19 2016 Miro Hrončok - 1.6.2-2 +- Rebuild for Python 3.6 + +* Wed Nov 09 2016 Kevin Fenzi - 1.6.2-1 +- Update to 1.6.2. Fixes bug #1385661 + +* Tue Jul 19 2016 Fedora Release Engineering - 1.6.1-2 +- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages + +* Tue May 31 2016 Nils Philippsen +- fix source URL + +* Sun May 22 2016 Luke Macken - 1.6.1-1 +- Update to 1.6.1. Fixes bug #1338436 + +* Sun Apr 10 2016 Kevin Fenzi - 1.6.0-1 +- Update to 1.6.0. Fixes bug #1300180 + +* Thu Feb 04 2016 Fedora Release Engineering - 1.4.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Mon Jan 25 2016 Haïkel Guémar - 1.4.2-1 +- Upstream 1.4.2 + +* Tue Nov 10 2015 Fedora Release Engineering - 1.4.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 + +* Thu Jun 18 2015 Fedora Release Engineering - 1.4.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Wed Apr 15 2015 Ralph Bean - 1.4.1-1 +- new version + +* Wed Aug 27 2014 Luke Macken - 1.4-1 +- Update to 1.4 + +* Sun Jun 08 2014 Fedora Release Engineering - 1.2.3-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Thu May 15 2014 Bohuslav Kabrda - 1.2.3-10 +- Enable tests again. + +* Wed May 14 2014 Bohuslav Kabrda - 1.2.3-9 +- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4 +- Set up macro for test bootstrap + +* Mon Jan 6 2014 Toshio Kuratomi - 1.2.3-8 +- And correct the obs_ver again as a later version was built +- Add obsoletes for the python3-webob1.2 package as well + +* Mon Sep 16 2013 Michael Schwendt - 1.2.3-7 +- correct python-webob1.2 obs_ver -* Fri Dec 27 2013 Daniel Mach - 1.2.3-6 -- Mass rebuild 2013-12-27 +* Sun Aug 04 2013 Fedora Release Engineering - 1.2.3-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Tue May 7 2013 Luke Macken - 1.2.3-5 - Remove the python-wsgiproxy build requirement (#960463)