From 88574ee249d099699495135209b0cf2e44931d10 Mon Sep 17 00:00:00 2001 From: liwiegang Date: Mon, 6 Dec 2021 13:53:58 +0800 Subject: [PATCH] feat: modify support python3 --- python-cherrypy.spec | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/python-cherrypy.spec b/python-cherrypy.spec index c1b9f97..0aea4fa 100644 --- a/python-cherrypy.spec +++ b/python-cherrypy.spec @@ -3,13 +3,14 @@ Name: python-cherrypy Version: 3.5.0 -Release: 12 +Release: 13 Summary: Pythonic, object-oriented web development framework License: BSD URL: https://cherrypy.org Source0: http://www.gitbuilder.ceph.com/pypi/packages/source/C/CherryPy/CherryPy-3.5.0.tar.gz BuildArch: noarch BuildRequires: python2-devel python2-setuptools python2-nose +BuildRequires: python3-devel python3-setuptools python3-nose %description CherryPy allows developers to build web applications in much the same way @@ -26,16 +27,32 @@ 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: Pythonic, object-oriented web development framework +%python_provide python3-cherrypy +Provides: python-cherrypy = %{version}-%{release} + +%description -n python3-cherrypy +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. + %prep %autosetup -n CherryPy-%{version} sed -i 's/\r//' cherrypy/tutorial/tutorial.conf +install -d %{_builddir}/python3-cherrypy +%{__cp} -r %{_builddir}/CherryPy-%{version}/* %{_builddir}/python3-cherrypy %build %{__python} setup.py build +cd %{_builddir}/python3-cherrypy +%py3_build %install rm -rf $RPM_BUILD_ROOT %{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT +cd %{_builddir}/python3-cherrypy +%py3_install %check %if 0%{?with_check} @@ -50,7 +67,16 @@ PYTHONPATH='../../' nosetests -s ./ -e 'test_SIGTERM' -e 'test_SIGHUP_tty' \ %{_bindir}/cherryd %{python_sitelib}/* +%files -n python3-cherrypy +%defattr(-,root,root,-) +%doc README.txt cherrypy/tutorial +%{_bindir}/cherryd +%{python3_sitelib}/* + %changelog +* Mon Dec 06 2021 liweigang - 3.5.0-13 +- modify support python3 + * Tue Mar 17 2020 zoushuangshuang - 3.5.0-12 - modify provide: python-cherrypy