56 lines
1.8 KiB
RPMSpec
56 lines
1.8 KiB
RPMSpec
%define with_check 0
|
|
%global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")
|
|
|
|
Name: python-cherrypy
|
|
Version: 3.5.0
|
|
Release: 10
|
|
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
|
|
|
|
%description
|
|
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 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
|
|
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
|
|
|
|
%build
|
|
%{__python} setup.py build
|
|
|
|
%install
|
|
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,-)
|
|
%doc README.txt cherrypy/tutorial
|
|
%{_bindir}/cherryd
|
|
%{python_sitelib}/*
|
|
|
|
%changelog
|
|
* Wed Mar 04 2020 zoushuangshuang <zoushuangshuang@huawei.com> - 3.5.0-10
|
|
- Package init
|