Blob Blame History Raw
%define pyver %(%{__python} -c "from distutils.sysconfig import get_python_version; print get_python_version()")
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}

Name:           python-cherrypy
Version:        2.0.0
Release:        1
Summary:        A pythonic, object-oriented web development framework
Group:          Development/Libraries
License:        BSD
URL:            http://www.cherrypy.org/
Source0:        http://dl.sf.net/cherrypy/CherryPy-2.0.0.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Patch0:         python-cherrypy-tutorial-doc.patch
Patch1:         python-cherrypy-regression-test.patch

BuildArch:      noarch
Requires:       python-abi = %{pyver}

%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.

%prep
%setup -q -n CherryPy-2.0.0
%patch0 -p1 
%patch1 -p1


%build
%{__python} setup.py build

%install
rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT --prefix=%{_prefix}

%check
cd cherrypy/test
%{__python} test.py

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%doc CHANGELOG.txt CHERRYPYTEAM.txt README.txt
%doc cherrypy/tutorial
%dir %{python_sitelib}/cherrypy
%dir %{python_sitelib}/cherrypy/lib
%dir %{python_sitelib}/cherrypy/lib/filter
%{python_sitelib}/cherrypy/*.py
%{python_sitelib}/cherrypy/*.pyc
%ghost %{python_sitelib}/cherrypy/*.pyo
%{python_sitelib}/cherrypy/lib/*.py
%{python_sitelib}/cherrypy/lib/*.pyc
%ghost %{python_sitelib}/cherrypy/lib/*.pyo
%{python_sitelib}/cherrypy/lib/filter/*.py
%{python_sitelib}/cherrypy/lib/filter/*.pyc
%ghost %{python_sitelib}/cherrypy/lib/filter/*.pyo

%changelog
* Sun May  8 2005 Gijs Hollestelle <gijs@gewis.nl> 2.0.0-1
- Updated to 2.0.0 final
- Updated python-cherrypy-tutorial-doc.patch to match new version

* Wed Apr  6 2005 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 2.0.0-0.2.b
- Removed CFLAGS

* Wed Mar 23 2005 Gijs Hollestelle <gijs[AT]gewis.nl> 2.0.0-0.1.b
- Initial Fedora Package