LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File python-twisted.spec of Package python-twisted (Project home:convoy)

#
# spec file for package python-twisted (Version 10.2.0)
#
# Copyright (c) 2011 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/
#



Name:           python-twisted
Version:        10.2.0
Release:        1
License:        MIT
Summary:        Event-driven networking framework in Python
Url:            http://twistedmatrix.com/trac/wiki/TwistedCore
Group:          Development/Languages/Python
%define tarname Twisted
Source:         %{tarname}-%{version}.tar.bz2
BuildRequires:  python-devel
BuildRequires:  python-openssl
BuildRequires:  python-pam
BuildRequires:  python-serial
BuildRequires:  python-zopeinterface
Requires:       python-openssl
Requires:       python-pam
Requires:       python-serial
Requires:       python-zopeinterface
Obsoletes:      python-twisted-core <= %{version}
Obsoletes:      python-twisted-conch <= %{version}
Obsoletes:      python-twisted-lore <= %{version}
Obsoletes:      python-twisted-mail <= %{version}
Obsoletes:      python-twisted-names <= %{version}
Obsoletes:      python-twisted-news <= %{version}
Obsoletes:      python-twisted-runner <= %{version}
Obsoletes:      python-twisted-web <= %{version}
Obsoletes:      python-twisted-words <= %{version}
Obsoletes:      python-twisted-xish <= %{version}
Provides:       python-twisted-core <= %{version}
Provides:       python-twisted-conch <= %{version}
Provides:       python-twisted-lore <= %{version}
Provides:       python-twisted-mail <= %{version}
Provides:       python-twisted-names <= %{version}
Provides:       python-twisted-news <= %{version}
Provides:       python-twisted-runner <= %{version}
Provides:       python-twisted-web <= %{version}
Provides:       python-twisted-words <= %{version}
# yes, it doesn't provide xish
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%{py_requires}

%description
A Development Tool Twisted is a framework, written in Python, for
writing networked applications. It includes implementations of a number
of commonly used network services such as a web server, an IRC chat
server, a mail server, a relational database interface and an object
broker. Developers can build applications using all of these services
as well as custom services that they write themselves. Twisted also
includes a user authentication system that controls access to services
and provides services with user context information to implement their
own security models.

Twisted provides important features needed for networking programming,
both at the high and low levels:

Pluggable event loops allowing the developer to take advantage of
platform-specific capabilities. Abstractions of protocols and
transports. Through Twisted Spread, mechanisms for network encoding of
data (in Python, Java, ELisp, and other languages), to a full-blown
distributed object system.

An Integrated Environment Twisted is an integration point for network
services that were previously unable to interoperate. Services within a
Twisted server can communicate with each other and share information
providing a very integrated programming environment that can re-use
large amounts of infrastructure across multiple network mediums (such
as chat, web, and mail).

As well as servers, Twisted supports several different kinds of clients
and GUIs. This means that the client can re-use large portions of the
server's code, improving test coverage and reliability while reducing
code size.

An Application Suite Twisted is a collection of servers and clients,
which can be used either by developers of new applications or directly.
For example an easy to run web server is available out of the box as an
application for the desktop user, but it is also a framework for
developers to use.

Author:
--------
    twisted-python@twistedmatrix.com

%package doc
License:        LGPLv2.1+
Summary:        Documentation for python-twisted
Group:          Development/Languages/Python

%description doc
Twisted is an event-based framework for internet applications.	It
includes a web server, a telnet server, a chat server, a news server, a
generic client and server for remote object access, and APIs for
creating new protocols and services. Twisted supports integration of
the Tk, GTK+, GTK+ 2, Qt, Mac OS X, or wxPython event loop with its
main event loop. The Win32 event loop is also supported. Twisted works
with all Python 2.2 and 2.3 versions.

python-twisted-doc contains the documentation for python-twisted.

Author:
--------
    twisted-python@twistedmatrix.com

%prep
%setup -q -n %{tarname}-%{version}

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

%install
python setup.py install --prefix=%{_prefix} --record-rpm=INSTALLED_FILES --root=%{buildroot}
# remove leftover C sources
find %{buildroot} -regex '.*\.[ch]' -exec rm {} ";"
sed -i '/\.[ch]$/d' INSTALLED_FILES
#  install man pages
install -d -m 755  %{buildroot}/%{_mandir}/man1/
install -m 644 doc/*/man/*.1 %{buildroot}/%{_mandir}/man1/
# install docs
mkdir -p %{buildroot}%{_docdir}/%{name}
install -m 644 twisted/topfiles/CREDITS LICENSE README NEWS %{buildroot}%{_docdir}/%{name}
cp -vr doc/* %{buildroot}%{_docdir}/%{name}

%clean
rm -rf %{buildroot}

%files -f INSTALLED_FILES
%defattr(-,root,root)
#%%doc twisted/topfiles/CREDITS LICENSE README NEWS
%doc %{_docdir}/%{name}/CREDITS
%doc %{_docdir}/%{name}/LICENSE
%doc %{_docdir}/%{name}/README
%doc %{_docdir}/%{name}/NEWS
%attr(644,root,root) %{_mandir}/man1/*

%files doc
%defattr(644,root,root,755)
%doc %{_docdir}/%{name}
%exclude %{_docdir}/%{name}/CREDITS
%exclude %{_docdir}/%{name}/LICENSE
%exclude %{_docdir}/%{name}/README
%exclude %{_docdir}/%{name}/NEWS

%changelog