%{?!python:%define python python} %{?!pybasever:%{expand:%%define pybasever %(%{__python} -c "import sys ; print sys.version[:3]")}} %{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} %define origname TwistedCore Name: %{python}-twisted-core Version: 2.4.0 Release: 3%{?dist} Summary: An asynchronous networking framework written in Python Group: Development/Libraries License: MIT URL: http://www.twistedmatrix.com Source0: http://tmrc.mit.edu/mirror/twisted/Twisted/2.4/%{origname}-%{version}.tar.bz2 Source1: twisted-dropin-cache BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: %{python}-devel BuildRequires: %{python}-zope-interface # for FC3 and earlier %if "%{pybasever}" < "2.4" Requires: python(abi) = %{pybasever} %endif Requires: %{python}-zope-interface Requires: pyOpenSSL %description An extensible framework for Python programming, with special focus on event-based network programming and multiprotocol integration. It is expected that one day the project will expanded to the point that the framework will seamlessly integrate with mail, web, DNS, netnews, IRC, RDBMSs, desktop environments, and your toaster. %prep %setup -n %{origname}-%{version} -q %build %install rm -rf $RPM_BUILD_ROOT %{__python} setup.py install -O1 --root $RPM_BUILD_ROOT # cfsupport is support for MacOSX Core Foundations, so we can delete it rm -rf $RPM_BUILD_ROOT%{python_sitearch}/twisted/internet/cfsupport # iocpreactor is a win32 reactor, so we can delete it rm -rf $RPM_BUILD_ROOT%{python_sitearch}/twisted/internet/iocpreactor # Man pages mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1/ cp -a doc/man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1/ rm -rf doc/man # Zsh tab complete stub (a la teratorn) mkdir -p $RPM_BUILD_ROOT%{_datadir}/zsh/site-functions sed 's#python -c#%{__python} -c#g' < twisted/python/_twisted_zsh_stub > _twisted_zsh_stub.MOD install _twisted_zsh_stub.MOD $RPM_BUILD_ROOT%{_datadir}/zsh/site-functions/_twisted_zsh_stub # script to regenerate dropin.cache mkdir -p $RPM_BUILD_ROOT%{_libexecdir} install -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_libexecdir} %clean rm -rf $RPM_BUILD_ROOT %post -p %{_libexecdir}/twisted-dropin-cache %files %defattr(-,root,root,-) %doc CREDITS LICENSE NEWS README %{_bindir}/manhole %{_bindir}/mktap %{_bindir}/tap2deb %{_bindir}/tap2rpm %{_bindir}/tapconvert %{_bindir}/tkmktap %{_bindir}/trial %{_bindir}/twistd %{_libexecdir}/twisted-dropin-cache %{_mandir}/man1/* %{_datadir}/zsh/site-functions/_twisted_zsh_stub %dir %{python_sitearch}/twisted/ %{python_sitearch}/twisted/*.py* %{python_sitearch}/twisted/application/ %{python_sitearch}/twisted/cred/ %{python_sitearch}/twisted/enterprise/ %{python_sitearch}/twisted/internet/ %dir %{python_sitearch}/twisted/manhole/ %{python_sitearch}/twisted/manhole/*.py* %{python_sitearch}/twisted/manhole/*.glade %{python_sitearch}/twisted/manhole/ui/ %{python_sitearch}/twisted/manhole/ui/*.py* %{python_sitearch}/twisted/manhole/ui/*.glade %{python_sitearch}/twisted/manhole/ui/gtkrc %{python_sitearch}/twisted/persisted/ %{python_sitearch}/twisted/persisted/journal/ %dir %{python_sitearch}/twisted/plugins/ %{python_sitearch}/twisted/plugins/*.py* %ghost %{python_sitearch}/twisted/plugins/dropin.cache %dir %{python_sitearch}/twisted/protocols/ %{python_sitearch}/twisted/protocols/*.py* %{python_sitearch}/twisted/protocols/*.c %{python_sitearch}/twisted/protocols/*.so %{python_sitearch}/twisted/protocols/gps/ %{python_sitearch}/twisted/protocols/mice/ %dir %{python_sitearch}/twisted/python/ %{python_sitearch}/twisted/python/*.py* %{python_sitearch}/twisted/python/_twisted_zsh_stub %dir %{python_sitearch}/twisted/python/zsh/ %{python_sitearch}/twisted/python/zsh/README %{python_sitearch}/twisted/python/zsh/_* %{python_sitearch}/twisted/scripts/ %dir %{python_sitearch}/twisted/spread/ %{python_sitearch}/twisted/spread/*.py* %{python_sitearch}/twisted/spread/*.c %{python_sitearch}/twisted/spread/*.so %dir %{python_sitearch}/twisted/spread/ui/ %{python_sitearch}/twisted/spread/ui/*.py* %{python_sitearch}/twisted/spread/ui/*.glade %{python_sitearch}/twisted/tap/ %dir %{python_sitearch}/twisted/test/ %{python_sitearch}/twisted/test/*.py* %{python_sitearch}/twisted/test/server.pem %dir %{python_sitearch}/twisted/trial/ %{python_sitearch}/twisted/trial/*.py* %dir %{python_sitearch}/twisted/trial/test/ %{python_sitearch}/twisted/trial/test/*.py* %{python_sitearch}/twisted/trial/test/notpython %changelog * Tue Sep 26 2006 Thomas Vander Stichele - 2.4.0-3 - no longer ghost .pyo files * Fri Jun 09 2006 Thomas Vander Stichele - 2.4.0-2 - add twisted-dropin-cache script and use it - ghost the dropin.cache file * Wed Jun 07 2006 Thomas Vander Stichele - 2.4.0-1 - upstream release - require pyOpenSSL as it is named in Extras * Mon Oct 10 2005 Jeff Pitman 2.1.0-1 - upstream release * Tue Aug 23 2005 Jeff Pitman 2.0.1-1 - upstream release * Mon Apr 04 2005 Jeff Pitman 2.0.0-2 - add zsh support * Fri Mar 25 2005 Jeff Pitman 2.0.0-1 - final release * Thu Mar 17 2005 Jeff Pitman 2.0.0-0.2.a3 - dropped web2 * Wed Mar 16 2005 Jeff Pitman 2.0.0-0.1.a3 - upstream release * Sat Mar 12 2005 Jeff Pitman 2.0.0-0.1.a2 - new prerelease; FE versioning * Mon Feb 07 2005 Jeff Pitman 2.0.0a1-1 - prep for split * Fri Aug 20 2004 Jeff Pitman 1.3.0-1 - new version * Mon Apr 19 2004 Jeff Pitman 1.2.0-3 - vaultize * Mon Apr 12 2004 Jeff Pitman 1.2.0-2 - require pyOpenSSL, SOAPpy, openssh-clients, crypto, dia so trial can run