rpms/python-twisted-core/devel .cvsignore, 1.2, 1.3 python-twisted-core.spec, 1.10, 1.11 sources, 1.3, 1.4

Matthias Saou thias at fedoraproject.org
Tue Dec 23 21:18:06 UTC 2008


Author: thias

Update of /cvs/extras/rpms/python-twisted-core/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv518

Modified Files:
	.cvsignore python-twisted-core.spec sources 
Log Message:
Update to 8.1.0.



Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/python-twisted-core/devel/.cvsignore,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- .cvsignore	15 Nov 2006 12:05:21 -0000	1.2
+++ .cvsignore	23 Dec 2008 21:17:35 -0000	1.3
@@ -1 +1 @@
-TwistedCore-2.4.0.tar.bz2
+TwistedCore-8.1.0.tar.bz2


Index: python-twisted-core.spec
===================================================================
RCS file: /cvs/extras/rpms/python-twisted-core/devel/python-twisted-core.spec,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- python-twisted-core.spec	30 Nov 2008 07:29:15 -0000	1.10
+++ python-twisted-core.spec	23 Dec 2008 21:17:35 -0000	1.11
@@ -1,23 +1,20 @@
-%{?!python:%define python python}
-%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
-
-%define origname TwistedCore
+%{!?python:%define python python}
+%{!?python_sitearch: %define python_sitearch %(%{python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
 
 Name:           %{python}-twisted-core
-Version:        2.5.0
-Release:        6%{?dist}
-Summary:        An asynchronous networking framework written in Python
-
+Version:        8.1.0
+Release:        2%{?dist}
+Summary:        Asynchronous networking framework written in Python
 Group:          Development/Libraries
 License:        MIT
 URL:            http://twistedmatrix.com/trac/wiki/TwistedCore
-Source0:        http://tmrc.mit.edu/mirror/twisted/Twisted/2.5/%{origname}-%{version}.tar.bz2
+Source0:        http://tmrc.mit.edu/mirror/twisted/Core/8.1/TwistedCore-%{version}.tar.bz2
+# Available here:
+# https://apestaart.org/thomas/trac/browser/pkg/fedora.extras/python-twisted-core/twisted-dropin-cache?format=raw
 Source1:        twisted-dropin-cache
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
 BuildRequires:  %{python}-devel
-BuildRequires:  %{python}-zope-interface
-
+BuildRequires:  %{python}-zope-interface >= 3.0.1
 BuildRequires:  /bin/sed
 BuildRequires:  /bin/awk
 
@@ -32,6 +29,9 @@
 that the framework will seamlessly integrate with mail, web, DNS,
 netnews, IRC, RDBMSs, desktop environments, and your toaster.
 
+Twisted Core is used by most of the servers, clients and protocols that are
+part of other Twisted projects.
+
 %package doc
 Summary:        Documentation for Twisted Core
 Group:          Documentation
@@ -50,129 +50,138 @@
 Tab completions for Zsh and Twisted Core.
 
 %prep
-%setup -n %{origname}-%{version} -q
-%{__sed} -i -e '/^#! *\/usr\/bin\/python/d' twisted/internet/glib2reactor.py
-%{__sed} -i -e '/^#!\/bin\/python/d'        twisted/trial/test/scripttest.py
-
-find doc -name \*.py | xargs chmod a-x
-chmod a-x doc/howto/listings/pb/copy_receiver.tac
-%{__sed} -i 's/\r//' doc/howto/listings/udp/MulticastClient.py
-%{__sed} -i 's/\r//' doc/howto/listings/udp/MulticastServer.py
+%setup -q -n TwistedCore-%{version}
+
+# Turn off exec bits on docs to avoid spurious dependencies
+/usr/bin/find doc -type f | /usr/bin/xargs chmod 644
+
+# Fix line endings
+%{__sed} -i -e 's,\r$,,' doc/howto/listings/udp/*
+
+# Remove spurious shellbangs
+%{__sed} -i -e '/^#! *\/usr\/bin\/python/d' \
+    twisted/internet/glib2reactor.py
+%{__sed} -i -e '/^#!\/bin\/python/d' \
+    twisted/trial/test/scripttest.py
 
 # Generate a brief README.zsh
-awk '/^Zsh Notes:/,/^Have fun!/' twisted/python/zshcomp.py > README.zsh
+%{__awk} '/^Zsh Notes:/,/^Have fun!/' twisted/python/zshcomp.py > README.zsh
+
+# Fix encodings
+for f in CREDITS LICENSE; do
+    /usr/bin/iconv -f iso-8859-1 -t utf-8 < ${f} > ${f}.utf8
+    %{__mv} -f ${f}.utf8 ${f}
+done
 
 %build
+CFLAGS="%{optflags}" %{python} setup.py build
 
 %install
-rm -rf $RPM_BUILD_ROOT
-%{__python} setup.py install -O1 --root $RPM_BUILD_ROOT
+%{__rm} -rf %{buildroot}
+%{python} setup.py install -O1 --skip-build --root %{buildroot}
 
 # cfsupport is support for MacOSX Core Foundations, so we can delete it
-rm -rf $RPM_BUILD_ROOT%{python_sitearch}/twisted/internet/cfsupport
+%{__rm} -rf %{buildroot}%{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
+%{__rm} -rf %{buildroot}%{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 -m 644 _twisted_zsh_stub.MOD $RPM_BUILD_ROOT%{_datadir}/zsh/site-functions/_twisted_zsh_stub
+%{__mkdir_p} %{buildroot}%{_mandir}/man1/
+%{__cp} -a doc/man/*.1 %{buildroot}%{_mandir}/man1/
+%{__rm} -rf doc/man
+
+# Zsh tab complete stub (à la teratorn)
+%{__mkdir_p} %{buildroot}%{_datadir}/zsh/site-functions/
+%{__sed} -e 's#python -c#%{python} -c#g' twisted/python/_twisted_zsh_stub \
+    > %{buildroot}%{_datadir}/zsh/site-functions/_twisted_zsh_stub
+%{__rm} -f %{buildroot}%{python_sitearch}/twisted/python/_twisted_zsh_stub
 
-# remove the version we won't use
-rm $RPM_BUILD_ROOT%{python_sitearch}/twisted/python/_twisted_zsh_stub
+# Some of the zsh completions are no longer appropriate
+/usr/bin/find %{buildroot}%{python_sitearch}/twisted/python/zsh -size 0c -exec %{__rm} -f {} \;
 
 # script to regenerate dropin.cache
-mkdir -p $RPM_BUILD_ROOT%{_libexecdir}
-install -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_libexecdir}
+%{__mkdir_p} %{buildroot}%{_libexecdir}
+%{__install} -m 755 %{SOURCE1} %{buildroot}%{_libexecdir}
+
+# Create an empty dropin.cache to be %ghost-ed
+/bin/touch %{buildroot}%{python_sitearch}/twisted/plugins/dropin.cache
 
-rm $RPM_BUILD_ROOT%{python_sitearch}/twisted/protocols/_c_urlarg.c
-rm $RPM_BUILD_ROOT%{python_sitearch}/twisted/python/_epoll.c
+# C files don't need to be packaged
+%{__rm} -f %{buildroot}%{python_sitearch}/twisted/protocols/_c_urlarg.c
+%{__rm} -f %{buildroot}%{python_sitearch}/twisted/python/_epoll.c
+%{__rm} -f %{buildroot}%{python_sitearch}/twisted/test/raiser.c
+
+# Fix permissions of shared objects
+%{__chmod} 755 %{buildroot}%{python_sitearch}/twisted/protocols/_c_urlarg.so
+%{__chmod} 755 %{buildroot}%{python_sitearch}/twisted/python/_epoll.so
+%{__chmod} 755 %{buildroot}%{python_sitearch}/twisted/test/raiser.so
+
+# See if there's any egg-info
+if [ -f %{buildroot}%{python_sitearch}/Twisted*.egg-info ]; then
+    echo %{buildroot}%{python_sitearch}/Twisted*.egg-info |
+        sed -e 's|^%{buildroot}||'
+fi > egg-info
+
+%check
+# trial twisted
+# can't get this to work within the buildroot yet
 
 %clean
-rm -rf $RPM_BUILD_ROOT
+%{__rm} -rf %{buildroot}
 
-%post -p %{_libexecdir}/twisted-dropin-cache
+%post
+%{_libexecdir}/twisted-dropin-cache || :
 
-%files
+%preun
+if [ $1 -eq 0 ]; then
+    # Complete removal, not upgrade, so remove plugins cache file
+    %{__rm} -f %{python_sitearch}/twisted/plugins/dropin.cache || :
+fi
+
+%files -f egg-info
 %defattr(-,root,root,-)
 %doc CREDITS LICENSE NEWS README
 %{_bindir}/manhole
 %{_bindir}/mktap
+%{_bindir}/pyhtmlizer
+%{_bindir}/t-im
 %{_bindir}/tap2deb
 %{_bindir}/tap2rpm
 %{_bindir}/tapconvert
 %{_bindir}/trial
 %{_bindir}/twistd
 %{_libexecdir}/twisted-dropin-cache
-
-%{_mandir}/man1/*
-
+%{_mandir}/man1/manhole.1*
+%{_mandir}/man1/mktap.1*
+%{_mandir}/man1/pyhtmlizer.1*
+%{_mandir}/man1/tap2deb.1*
+%{_mandir}/man1/tap2rpm.1*
+%{_mandir}/man1/tapconvert.1*
+%{_mandir}/man1/trial.1*
+%{_mandir}/man1/twistd.1*
 %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/
 %{python_sitearch}/twisted/persisted/
-
 %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/*.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/*.so
-
-%dir %{python_sitearch}/twisted/python/zsh/
-%{python_sitearch}/twisted/python/zsh/README
-%{python_sitearch}/twisted/python/zsh/_*
-
+%{python_sitearch}/twisted/protocols/
+%{python_sitearch}/twisted/python/
 %{python_sitearch}/twisted/scripts/
-
 %dir %{python_sitearch}/twisted/spread/
 %{python_sitearch}/twisted/spread/*.py*
-
 %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
-
-%if 0%{?fedora} >= 9
-  %{python_sitearch}/Twisted-%{version}-py?.?.egg-info
-%endif
+%{python_sitearch}/twisted/test/
+%{python_sitearch}/twisted/trial/
 
 %files doc
 %defattr(-,root,root,-)
@@ -184,6 +193,12 @@
 %{_datadir}/zsh/site-functions/_twisted_zsh_stub
 
 %changelog
+* Tue Dec 23 2008 Matthias Saou <http://freshrpms.net/> 8.1.0-2
+- Re-introduce the python macro for parallel installable packages.
+- Make sure the scriplet never returns a non-zero exit status.
+- Remove dropin.cache file upon package removal.
+- Merge back changes from Paul Howarth.
+
 * Sun Nov 30 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm at gmail.com> - 2.5.0-6
 - Fix locations for Python 2.6
 


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/python-twisted-core/devel/sources,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- sources	31 Aug 2007 20:09:54 -0000	1.3
+++ sources	23 Dec 2008 21:17:35 -0000	1.4
@@ -1 +1 @@
-cf8d8d73c3b58b79c6a16b5fc23d5b61  TwistedCore-2.5.0.tar.bz2
+b6f766c7512d342be1844eeee974031d  TwistedCore-8.1.0.tar.bz2




More information about the fedora-extras-commits mailing list