From bafa2e33f91e8f96d71c37dcdea80cfd762a6695 Mon Sep 17 00:00:00 2001 From: Dan Radez Date: Aug 10 2019 10:41:00 +0000 Subject: Updating to 18.1.2 and migrating python3-cherrypy to this package - Update to 18.1.2 - Replaced Python2 package with Python 3 package - python3-cherrypy-18.1.2-2 is already built by package python3-cherrypy this release is to migrate python3-cherrypy into python-cherrypy --- diff --git a/python-cherrypy-tutorial-doc.patch b/python-cherrypy-tutorial-doc.patch deleted file mode 100644 index 2b189bb..0000000 --- a/python-cherrypy-tutorial-doc.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- CherryPy-3.5.0.orig/setup.py 2014-08-27 15:34:43.973310337 -0600 -+++ CherryPy-3.5.0/setup.py 2014-08-27 15:35:18.131503260 -0600 -@@ -74,7 +74,6 @@ - cp_license = "BSD" - packages = [ - "cherrypy", "cherrypy.lib", -- "cherrypy.tutorial", "cherrypy.test", - "cherrypy.process", - "cherrypy.scaffold", - "cherrypy.wsgiserver", -@@ -90,19 +89,6 @@ - ]), - ('cherrypy/scaffold/static', [ - 'cherrypy/scaffold/static/made_with_cherrypy_small.png']), -- ('cherrypy/test', ['cherrypy/test/style.css', -- 'cherrypy/test/test.pem', -- ]), -- ('cherrypy/test/static', ['cherrypy/test/static/index.html', -- 'cherrypy/test/static/dirback.jpg', ]), -- ('cherrypy/tutorial', -- [ -- 'cherrypy/tutorial/tutorial.conf', -- 'cherrypy/tutorial/README.txt', -- 'cherrypy/tutorial/pdf_file.pdf', -- 'cherrypy/tutorial/custom_error.html', -- ] -- ), - ] - scripts = ["cherrypy/cherryd"] - diff --git a/python-cherrypy.spec b/python-cherrypy.spec index 9c24f4b..9f4885e 100644 --- a/python-cherrypy.spec +++ b/python-cherrypy.spec @@ -2,68 +2,91 @@ # https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation_phase_2 %global _python_bytecompile_extra 1 -%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 - Name: python-cherrypy -Version: 3.5.0 -Release: 12%{?dist} +%global camelname CherryPy +Version: 18.1.2 +Release: 3%{?dist} Summary: Pythonic, object-oriented web development framework License: BSD URL: http://www.cherrypy.org/ -Source0: http://download.cherrypy.org/cherrypy/%{version}/CherryPy-%{version}.tar.gz +Source0: http://download.cherrypy.org/cherrypy/%{version}/%{camelname}-%{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 - BuildArch: noarch -BuildRequires: python2-devel -BuildRequires: python2-setuptools -BuildRequires: python2-nose +obsoletes: python2-cherrypy < 3.5.1 +obsoletes: python3-cherrypy < 18.1.2-3 + +BuildRequires: dos2unix +BuildRequires: python3-devel +BuildRequires: python3dist(setuptools) +BuildRequires: python3-setuptools_scm +# Test dependencies +BuildRequires: python3dist(cheroot) +BuildRequires: python3dist(mock) +BuildRequires: python3-path +BuildRequires: python3dist(portend) +BuildRequires: python3dist(pytest) +BuildRequires: python3dist(pytest-cov) +BuildRequires: python3dist(requests-toolbelt) +BuildRequires: python3dist(coverage) +BuildRequires: python3dist(nose) +BuildRequires: python3dist(nose-testconfig) +BuildRequires: python3-zc-lockfile %global _description\ -CherryPy allows developers to build web applications in much the same way\ +%{camelname} 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. %description %_description -%package -n python2-cherrypy +%package -n python3-cherrypy Summary: %summary -%{?python_provide:%python_provide python2-cherrypy} +%{?python_provide:%python_provide python3-cherrypy} -%description -n python2-cherrypy %_description +%description -n python3-cherrypy %_description %prep -%setup -q -n CherryPy-%{version} -%patch0 -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 + +# python-path in Fedora is not new enough to support +# a couple tests: +# https://bugzilla.redhat.com/show_bug.cgi?id=1206250 +# https://src.fedoraproject.org/rpms/python-path/pull-request/2 +rm cherrypy/test/test_session.py +rm cherrypy/test/test_static.py %build -%py2_build +%py3_build %install -rm -rf $RPM_BUILD_ROOT -%py2_install +%py3_install %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' -e 'test_no_content_length' - -%files -n python2-cherrypy -%doc README.txt +LANG=C.utf-8 %{__python3} -m pytest --ignore=build + +%files -n python3-cherrypy +%doc README.rst +%license LICENSE.md %doc cherrypy/tutorial %{_bindir}/cherryd -%{python2_sitelib}/* +%{python3_sitelib}/* +%exclude %{python3_sitelib}/cherrypy/cherryd +%exclude %{python3_sitelib}/cherrypy/test +%exclude %{python3_sitelib}/cherrypy/tutorial %changelog +* Thu Aug 08 2019 Dan Radez - 18.1.2-3 +- Update to 18.1.2 +- Replaced Python2 package with Python 3 package +- python3-cherrypy-18.1.2-2 is already built by package python3-cherrypy + this release is to migrate python3-cherrypy into python-cherrypy + * Fri Jul 26 2019 Fedora Release Engineering - 3.5.0-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild diff --git a/sources b/sources index b4f27e9..1a5c857 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9099b32cdd91271480ee6544ba9e5043 CherryPy-3.5.0.tar.gz +SHA512 (CherryPy-18.1.2.tar.gz) = 5ecfcb7008769dc9122cbfdff1a75d21ee3b572f6bc538a6be4ace7d99a9cef6e823a2c7c75795ad615c46ac01ea72d11f0edebc6f502080b4cb2874938e387f