2011-05-31 07:29:52 +00:00
|
|
|
#
|
2011-07-04 13:31:36 +00:00
|
|
|
# spec file for package python-CherryPy
|
2011-05-31 07:29:52 +00:00
|
|
|
#
|
2015-02-23 14:05:21 +00:00
|
|
|
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
2011-05-31 07:29:52 +00:00
|
|
|
#
|
|
|
|
# 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.
|
2011-07-04 13:31:36 +00:00
|
|
|
|
2011-05-31 07:29:52 +00:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2011-07-04 13:31:36 +00:00
|
|
|
|
2011-05-31 07:29:52 +00:00
|
|
|
Name: python-CherryPy
|
2015-02-23 14:05:21 +00:00
|
|
|
Version: 3.6.0
|
2013-06-17 12:50:22 +00:00
|
|
|
Release: 0
|
2011-05-31 07:29:52 +00:00
|
|
|
Url: http://www.cherrypy.org
|
|
|
|
Summary: Object-Oriented HTTP framework
|
2011-12-06 17:54:57 +00:00
|
|
|
License: BSD-3-Clause
|
2011-05-31 07:29:52 +00:00
|
|
|
Group: Development/Languages/Python
|
2013-09-27 07:09:04 +00:00
|
|
|
Source: https://pypi.python.org/packages/source/C/CherryPy/CherryPy-%{version}.tar.gz
|
2011-05-31 07:29:52 +00:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
BuildRequires: python-devel
|
2015-02-23 14:05:21 +00:00
|
|
|
Requires(post): update-alternatives
|
|
|
|
Requires(postun): update-alternatives
|
2013-09-27 07:09:04 +00:00
|
|
|
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
|
|
|
|
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
|
|
|
%else
|
2011-05-31 07:29:52 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
%endif
|
|
|
|
Provides: python-cherrypy = %{version}
|
2013-09-27 07:09:04 +00:00
|
|
|
Obsoletes: python-cherrypy < %{version}
|
2011-05-31 07:29:52 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
CherryPy is a pythonic, object-oriented HTTP 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 :-)
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n CherryPy-%{version}
|
|
|
|
|
|
|
|
%build
|
|
|
|
python setup.py build
|
|
|
|
|
|
|
|
%install
|
|
|
|
sed -i 's|\r||' README.txt # Fix wrong EOL encoding
|
|
|
|
find . -name sessiondemo.py -type f -exec chmod 0755 {} \; # Fix non-executable bit rpmlint warning
|
|
|
|
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
|
|
|
|
2015-02-23 14:05:21 +00:00
|
|
|
# update-alternatives
|
|
|
|
mv %{buildroot}%{_bindir}/cherryd %{buildroot}%{_bindir}/cherryd-%{py_ver}
|
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
|
|
|
touch %{buildroot}%{_sysconfdir}/alternatives/cherryd
|
|
|
|
ln -sf %{_sysconfdir}/alternatives/cherryd %{buildroot}%{_bindir}/cherryd
|
|
|
|
|
|
|
|
%post
|
|
|
|
update-alternatives \
|
|
|
|
--install %{_bindir}/cherryd cherryd %{_bindir}/cherryd-%{py_ver} 20
|
|
|
|
|
|
|
|
%postun
|
|
|
|
if [ $1 -eq 0 ] ; then
|
|
|
|
update-alternatives --remove cherryd %{_bindir}/cherryd-%{py_ver}
|
|
|
|
fi
|
|
|
|
|
2011-05-31 07:29:52 +00:00
|
|
|
%files
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%doc README.txt
|
2015-02-23 14:05:21 +00:00
|
|
|
%ghost %{_sysconfdir}/alternatives/cherryd
|
2011-05-31 07:29:52 +00:00
|
|
|
%{_bindir}/cherryd
|
2015-02-23 14:05:21 +00:00
|
|
|
%{_bindir}/cherryd-%{py_ver}
|
2012-05-23 07:12:51 +00:00
|
|
|
%{python_sitelib}/cherrypy/
|
|
|
|
%{python_sitelib}/CherryPy-%{version}-py%{py_ver}.egg-info
|
2011-05-31 07:29:52 +00:00
|
|
|
|
|
|
|
%changelog
|