| |
@@ -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 <dradez@redhat.com> - 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 <releng@fedoraproject.org> - 3.5.0-12
|
| |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
| |
|
| |
this release is to migrate python3-cherrypy into python-cherrypy