diff --git a/SPECS/python-cherrypy.spec b/SPECS/python-cherrypy.spec index 4a85ce4..6491e49 100644 --- a/SPECS/python-cherrypy.spec +++ b/SPECS/python-cherrypy.spec @@ -1,91 +1,206 @@ -%if !(0%{?fedora} > 12 || 0%{?rhel} > 5) -%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -%endif +# This package depends on automagic byte compilation +# https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation_phase_2 +%global _python_bytecompile_extra 1 Name: python-cherrypy -Version: 3.2.2 -Release: 4%{?dist} +%global camelname CherryPy +Version: 8.9.1 +Release: 8%{?dist} Summary: Pythonic, object-oriented web development framework -Group: Development/Libraries License: BSD URL: http://www.cherrypy.org/ -Source0: http://download.cherrypy.org/cherrypy/%{version}/CherryPy-%{version}.tar.gz -# Don't ship the tests or tutorials in the python module directroy, -# tutorial will be shipped as doc instead -Patch0: python-cherrypy-tutorial-doc.patch -Patch1: cherrypy-unittest.patch - -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +Source0: https://files.pythonhosted.org/packages/source/C/%{camelname}/%{camelname}-%{version}.tar.gz BuildArch: noarch +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-setuptools_scm +BuildRequires: dos2unix + +# Extras +Requires: python3-pyOpenSSL +Requires: python3-simplejson +# Keeping these two as 'Recommends' because the version requirements aren't yet +# currently satisfied in Fedora +Requires: python3-routes >= 2.3.1 +Requires: python3-memcached >= 1.58 + +# Test dependencies +BuildRequires: python3-mock +BuildRequires: python3-pytest +BuildRequires: python3-coverage +BuildRequires: python3-nose +BuildRequires: python3-nose-testconfig + +%global _description\ +CherryPy allows developers to build web applications in much the same way\ +they would build any other object-oriented Python program. This usually\ +results in smaller source code developed in less time. -BuildRequires: python2-devel -BuildRequires: python-setuptools -BuildRequires: python-nose +%description %_description -%description -CherryPy allows developers to build web applications in much the same way -they would build any other object-oriented Python program. This usually -results in smaller source code developed in less time. +%package -n python3-cherrypy +Summary: %{summary} +%{?python_provide:%python_provide python3-cherrypy} +%description -n python3-cherrypy %prep -%setup -q -n CherryPy-%{version} -%patch0 -p1 -%patch1 -p1 +%setup -q -n %{camelname}-%{version} -%{__sed} -i 's/\r//' README.txt cherrypy/tutorial/README.txt cherrypy/tutorial/tutorial.conf +dos2unix cherrypy/tutorial/tutorial.conf %build -%{__python} setup.py build +%py3_build %install -rm -rf $RPM_BUILD_ROOT -%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT +%py3_install + +mv %{buildroot}%{_bindir}/cherryd %{buildroot}%{_bindir}/python%{python3_version}-cherryd +ln -s python%{python3_version}-cherryd %{buildroot}%{_bindir}/python3-cherryd %check -cd cherrypy/test -# These two tests hang in the buildsystem so we have to disable them. -# The third fails in cherrypy 3.2.2. -PYTHONPATH='../../' nosetests -s ./ -e 'test_SIGTERM' -e \ - 'test_SIGHUP_tty' -e 'test_file_stream' - -%clean -rm -rf $RPM_BUILD_ROOT - -%files -%defattr(-,root,root,-) -%doc README.txt +LANG=C.utf-8 %{__python3} -m pytest --ignore=build --ignore=cherrypy/test/test_static.py + +%files -n python3-cherrypy +%license LICENSE.md +%doc README.rst %doc cherrypy/tutorial -%{_bindir}/cherryd -%{python_sitelib}/* +%{_bindir}/python3-cherryd +%{_bindir}/python%{python3_version}-cherryd +%{python3_sitelib}/* +%exclude %{python3_sitelib}/cherrypy/cherryd +%exclude %{python3_sitelib}/cherrypy/test +%exclude %{python3_sitelib}/cherrypy/tutorial %changelog -* Tue Jun 9 2015 Rob Crittenden - 3.2.2-4 -- Rebuild for EL 7.2 +* Mon Feb 10 2020 Giulio Fidente - 8.9.1-8 +- Skip test_null_bytes because python <= 3.7.6 -* Sat Jul 21 2012 Fedora Release Engineering - 3.2.2-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild +* Fri Mar 15 2019 Ken Dreyer - 8.9.1-7 +- rename source package to python-cherrypy -* Sat Jan 14 2012 Fedora Release Engineering - 3.2.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild +* Sat Feb 02 2019 Fedora Release Engineering - 8.9.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Sat Jul 14 2018 Fedora Release Engineering - 8.9.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Tue Jun 19 2018 Miro Hrončok - 8.9.1-4 +- Rebuilt for Python 3.7 + +* Fri Feb 09 2018 Fedora Release Engineering - 8.9.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 8.9.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Wed Feb 22 2017 Tomas Orsava - 8.9.1-1 +- Updated to 8.9.1 to solve a FTBFS (#1424123) + +* Sat Feb 11 2017 Fedora Release Engineering - 8.7.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Sun Jan 01 2017 Miro Hrončok - 8.7.0-1 +- Updated to 8.7.0 (#1409339) + +* Wed Dec 28 2016 Miro Hrončok - 8.6.0-1 +- Updated to 8.6.0 (#1331982) +- Rebuild for Python 3.6 + +* Tue Jul 19 2016 Fedora Release Engineering - 5.1.0-2 +- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages + +* Wed Mar 16 2016 Tomas Orsava - 5.1.0-1 +- Updated to a new version +- Patched a build test error in said new version + +* Wed Mar 09 2016 Tomas Orsava - 5.0.1-2 +- Included a patch for the last issue when building against python 3.5 + (f24 or rawhide) based on an upstream commit: + https://bitbucket.org/cyraxjoe/cherrypy/commits/3c0983f310777933a687d265601981d05025ff2e + +* Thu Feb 25 2016 Tomas Orsava - 5.0.1-1 +- Updated to a new version +- Added one new build dependency +- Included a patch for the first of two test errors when building for rawhide + (caused by changes in python 3.5) based on an upstream pull request: + https://bitbucket.org/cherrypy/cherrypy/pull-requests/120/workaround-for-issue-1382-python-35 -* Thu Oct 27 2011 Conrad Meyer - 3.2.2-1 -- Update to 3.2.2 +* Thu Feb 04 2016 Fedora Release Engineering - 3.8.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild -* Sat Jul 16 2011 Toshio Kuratomi - 3.2.1-1 -- Update to 3.2.1 +* Tue Nov 10 2015 Fedora Release Engineering - 3.8.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 -* Tue Feb 08 2011 Fedora Release Engineering - 3.1.2-6 +* Tue Jul 07 2015 Miro Hrončok - 3.8.0-1 +- Update to 3.8.0 (#1236248) + +* Thu Jun 18 2015 Fedora Release Engineering - 3.7.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sat Apr 25 2015 Fedora Release Monitoring - 3.7.0-1 +- Update to 3.7.0 (#1215290) + +* Fri Sep 26 2014 Miro Hrončok - 3.6.0-1 +- New version 3.6.0 (#1100749) +- Skip more tests :( + +* Sun Jun 08 2014 Fedora Release Engineering - 3.2.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Fri May 16 2014 Matej Stuchlik - 3.2.6-1 +- Updated to 3.2.6 + +* Fri May 02 2014 Miro Hrončok - 3.2.4-4 +- Rebuilt for Python 3.4 + +* Wed Nov 13 2013 Miro Hrončok - 3.2.4-3 +- Delete tutorial's __pycache__ after %%install AND after %%check + +* Tue Nov 12 2013 Miro Hrončok - 3.2.4-2 +- Use only %%{buildroot} and don't mix it with RPM_BUILD_ROOT + +* Tue Nov 12 2013 Miro Hrončok - 3.2.4-1 +- Retaken orphaned package +- Update to 3.2.4 +- Remove some deprecated statements form the spec +- Remove some patches +- Refactor %%check +- Add license to %%doc and remove it form site-packages + +* Sun Aug 04 2013 Fedora Release Engineering - 3.2.0-0.rc1.r2567.1.8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Thu Feb 14 2013 Fedora Release Engineering - 3.2.0-0.rc1.r2567.1.7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Sat Aug 04 2012 David Malcolm - 3.2.0-0.rc1.r2567.1.6 +- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3 + +* Sat Jul 21 2012 Fedora Release Engineering - 3.2.0-0.rc1.r2567.1.5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Sat Jan 14 2012 Fedora Release Engineering - 3.2.0-0.rc1.r2567.1.4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Wed Feb 09 2011 Fedora Release Engineering - 3.2.0-0.rc1.r2567.1.3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild -* Wed Jul 21 2010 David Malcolm - 3.1.2-5 +* Wed Aug 25 2010 Thomas Spura - 3.2.0-0.rc1.r2567.1.2 +- rebuild with python3.2 + http://lists.fedoraproject.org/pipermail/devel/2010-August/141368.html + +* Thu Jul 22 2010 David Malcolm - 3.2.0-0.rc1.r2567.1.1 - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild -* Mon May 31 2010 Toshio Kuratomi - 3.1.2-4 -- Fix a failing unittest with newer python +* Mon Apr 19 2010 David Malcolm - 3.2.0-0.rc1.r2567.1 +- disable a test that hangs when run under Koji (patch 1) + +* Mon Apr 5 2010 David Malcolm - 3.2.0-0.rc1.r2567 +- initial packaging for python 3, based on python-cherrypy-3.2.0-0.1.rc1.fc14 -* Sat Apr 24 2010 Toshio Kuratomi - 3.1.2-3 -- Revert a try at 3.2.x-rc1 as the tests won't pass without some work. +* Tue Feb 23 2010 Toshio Kuratomi - 3.2.0-0.1.rc1 +- New upstream release candidate * Sun Jul 26 2009 Fedora Release Engineering - 3.1.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild