From fb44df4d1a68109d26f72f8d104cd3c013497f76 Mon Sep 17 00:00:00 2001 From: yiyurain Date: Mon, 16 Mar 2020 19:16:26 +0800 Subject: [PATCH] add provide --- python-cherrypy.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python-cherrypy.spec b/python-cherrypy.spec index a41e34f..5d792e0 100644 --- a/python-cherrypy.spec +++ b/python-cherrypy.spec @@ -1,3 +1,4 @@ +%define with_check 0 %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()") Name: python-cherrypy @@ -18,6 +19,7 @@ results in smaller source code developed in less time. %package -n python2-cherrypy Summary: Pythonic, object-oriented web development framework %python_provide python2-cherrypy +%python_provide python-cherrypy %description -n python2-cherrypy CherryPy allows developers to build web applications in much the same way @@ -36,9 +38,11 @@ rm -rf $RPM_BUILD_ROOT %{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT %check +%if 0%{?with_check} cd cherrypy/test PYTHONPATH='../../' nosetests -s ./ -e 'test_SIGTERM' -e 'test_SIGHUP_tty' \ -e 'test_file_stream' -e 'test_no_content_length' +%endif %files -n python2-cherrypy %defattr(-,root,root,-)