| |
@@ -1,28 +1,31 @@
|
| |
- # This package depends on automagic byte compilation
|
| |
- # 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: 11%{?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
|
| |
- # 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
|
| |
+ %global pypi_name cherrypy
|
| |
|
| |
+ Name: python-%{pypi_name}
|
| |
+ Version: 18.1.1
|
| |
+ Release: 1%{?dist}
|
| |
+ Summary: Object-Oriented HTTP framework
|
| |
|
| |
+ License: BSD
|
| |
+ URL: https://www.cherrypy.org
|
| |
+ Source0: https://files.pythonhosted.org/packages/source/c/%{pypi_name}/CherryPy-%{version}.tar.gz
|
| |
BuildArch: noarch
|
| |
|
| |
- BuildRequires: python2-devel
|
| |
- BuildRequires: python2-setuptools
|
| |
- BuildRequires: python2-nose
|
| |
+ BuildRequires: python3-devel
|
| |
+ BuildRequires: python3dist(alabaster)
|
| |
+ BuildRequires: python3dist(cheroot) >= 6.2.4
|
| |
+ BuildRequires: python3dist(more-itertools)
|
| |
+ BuildRequires: python3dist(objgraph)
|
| |
+ # Fedora's python-path library is too old, rhbz#1206250
|
| |
+ BuildRequires: python3dist(path.py) >= 6.2
|
| |
+ BuildRequires: python3dist(portend) >= 2.1.1
|
| |
+ BuildRequires: python3dist(pyopenssl)
|
| |
+ BuildRequires: python3dist(pytest) >= 2.8
|
| |
+ BuildRequires: python3dist(requests-toolbelt)
|
| |
+ BuildRequires: python3dist(routes) >= 2.3.1
|
| |
+ BuildRequires: python3dist(setuptools)
|
| |
+ BuildRequires: python3dist(setuptools-scm)
|
| |
+ BuildRequires: python3dist(simplejson)
|
| |
+ BuildRequires: python3dist(zc.lockfile)
|
| |
|
| |
%global _description\
|
| |
CherryPy allows developers to build web applications in much the same way\
|
| |
@@ -31,39 +34,41 @@
|
| |
|
| |
%description %_description
|
| |
|
| |
- %package -n python2-cherrypy
|
| |
- Summary: %summary
|
| |
- %{?python_provide:%python_provide python2-cherrypy}
|
| |
-
|
| |
- %description -n python2-cherrypy %_description
|
| |
+ %package -n python3-%{pypi_name}
|
| |
+ Summary: %{summary}
|
| |
+ %{?python_provide:%python_provide python3-%{pypi_name}}
|
| |
+ %description -n python3-%{pypi_name}
|
| |
|
| |
%prep
|
| |
- %setup -q -n CherryPy-%{version}
|
| |
- %patch0 -p1
|
| |
+ %autosetup -n CherryPy-%{version}
|
| |
+ # Drop test that uses pytest-services:
|
| |
+ rm cherrypy/test/test_session.py
|
| |
|
| |
- %{__sed} -i 's/\r//' README.txt cherrypy/tutorial/README.txt cherrypy/tutorial/tutorial.conf
|
| |
+ # Drop coverage dependencies:
|
| |
+ sed -i 's/ --cov=cherrypy//' pytest.ini
|
| |
+ sed -i 's/ --cov-report term-missing:skip-covered//' pytest.ini
|
| |
+ sed -i 's/ --cov-report xml//' pytest.ini
|
| |
|
| |
%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
|
| |
- %doc cherrypy/tutorial
|
| |
+ py.test-%{python3_version} -v
|
| |
+
|
| |
+ %files -n python3-%{pypi_name}
|
| |
+ %license LICENSE.md
|
| |
+ %doc README.rst cherrypy/tutorial/README.rst
|
| |
%{_bindir}/cherryd
|
| |
- %{python2_sitelib}/*
|
| |
+ %{python3_sitelib}/*
|
| |
|
| |
%changelog
|
| |
+ * Wed Mar 27 2019 Ken Dreyer <kdreyer@redhat.com> - 18.1.1-1
|
| |
+ - Update to latest upstream release (rhbz#1411746)
|
| |
+ - Python 3 only
|
| |
+
|
| |
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.5.0-11
|
| |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
| |
|
| |
This updates to latest upstream release (rhbz#1411746) and changes the package to Python 3-only.
This change requires a few new packages that are not yet in Fedora, and an update to Fedora's python-path (rhbz#1206250), so I'm just posting it for review for now.