File python-cherrypy2.spec of Package python-cherrypy2

#
# spec file for package python-CherryPy2
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}

%define mod_name cherrypy2

Name:           python-%{mod_name}
Version:        2.3.0
Release:        0
URL:            http://www.cherrypy.org/
Summary:        A pythonic, object-oriented web development framework
License:        BSD
Group:          Development/Libraries/Python
Source:         CherryPy-%{version}.tar.bz2
Patch:          cherrypy2.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-root
BuildRequires:  python-devel dos2unix
%if 0%{?suse_version}
%py_requires
%if %{?suse_version: %{suse_version} > 1110} %{!?suse_version:1}
BuildArch:      noarch
%endif
%endif

%description
CherryPy is a pythonic, object-oriented web development framework.

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.

CherryPy is now more than three years old and it is has proven very fast and
stable. It is being used in production by many sites, from the simplest ones
to the most demanding ones.

Oh, and most importantly: CherryPy is fun to work with :-)


Authors:
--------
    CherryPy Team <team@cherrypy.org>
    Remi Delon
    Carlos Ribeiro
    Remco Boerma
    Jesir Vargas
    Pawel Maczewski
    Peter Hunt
    Elvelind Grandin <elvelind@gmail.com>
    Sylvain Hellegouarch
    Michael Robinson
    Robert Brewer
    John P. Speno

%prep
%setup -q -n CherryPy-%{version}
%patch -p1
ln -s cherrypy cherrypy2
# Avoid warning wrong-file-end-of-line-encoding
find README.txt CHANGELOG.txt CHERRYPYTEAM.txt -print0 | xargs -0 dos2unix

%build
export CFLAGS="%{optflags}"
python setup.py build

%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot} %{?suse_version: --record-rpm=INSTALLED_FILES}
perl -p -i -e 's#^(.*/has space.html)$#"\1"#' INSTALLED_FILES

%clean
rm -rf %{buildroot}

%files %{?suse_version: -f INSTALLED_FILES}
%defattr(-,root,root,-)
%doc README.txt CHANGELOG.txt CHERRYPYTEAM.txt
%if 0%{!?suse_version:1}
%python_sitelib/CherryPy*.egg-info
%python_sitelib/cherrypy*
%endif

%changelog
openSUSE Build Service is sponsored by