Gareth Armstrong | 7 Apr 2010 14:53
Picon
Favicon

Re: Spec file, service script and info patch

Hello Darragh and Gianluca,

I also maintain a buildbot set of buildbot/twisted packages internally 
in HP mainly targetting Rhel5.  I would be happy to see them benefit a 
larger public.  The spec files all originated from Fedora rawhide SRPMS 
and have been synced up with Fedora occasionally.   I still have not yet 
gotten round to push all the changes back but I will get there.

The python-twisted-* spec files are for Twisted 10.0.0 but don't cover 
all the modules, but if you need I will work on the ones that are missing.

In any case, I hope the attached spec files are of help.

All the best,

Gareth

On 04/06/2010 11:00 PM, Gianluca Sforna wrote:
> Hi Darragh,
> I'm maintaining the Fedora RPM package so I'm really interested in
> your changes as I started (but not yet finished) some work to improve
> the package with similar goals.
>
> On Tue, Apr 6, 2010 at 4:49 PM, Bailey, Darragh<dbailey@...>  wrote:
>    
>> I've been building buildbot for the last while with a custom spec file as well as including some
additional files that might be useful to other people.
>>      
> Yes, definitely :)
>
>    
>>
>> Btw, the main reason I created my own spec file is that I found the distutils bdist_rpm command to be less
than perfect when creating rpms for RHEL. That may be less of a problem when RHEL6 is released with a much
more recent python.
>>      
> I wanted to push the package in the EPEL repository for RHEL5, but
> right now it lacks a couple twisted dependencies so I could not build
> it. I will surely announce it on list when I manage to solve this
> issue.
>
>    

-- 
-------------------------------------------------------------------------------
  Gareth ARMSTRONG
  HP Communications&  Media Solutions
  Email  : gareth.armstrong@...
  Phone  : +33 (0)4.76.14.43.89
-------------------------------------------------------------------------------

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

# Run tests but no hard BuildRequires on various exotic SCM ;-) that
# we don't have on Rhel5
%global tests 0

# "--with dvcs_tests" adds hard BuildRequires for various distributed SCMs
# to the tests above
%global dvcs_tests 0%{?_with_scm_tests:1}

%global srctarball djmitche-buildbot-75e382b

#====================================================================#

Name:     buildbot
Version:  0.7.12
Release:  1.oc%{?dist}
Summary:  Build/test automation system

Group:    Development/Tools
License:  GPLv2
URL:      http://buildbot.net
#Source0:  http://github.com/djmitche/%{name}/tarball/%{srctarball}.tar.gz
Source0:  http://pypi.python.org/packages/source/b/%{name}/%{name}-%{version}.tar.gz

BuildRoot:   %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildArch:   noarch

BuildRequires:  python-devel
BuildRequires:  python-setuptools
BuildRequires:  texinfo
%if %{tests}
BuildRequires:  python-twisted-core
BuildRequires:  python-twisted-web
BuildRequires:  python-twisted-mail
BuildRequires:  python-twisted-words
BuildRequires:  cvs
BuildRequires:  subversion
BuildRequires:  mercurial
# We don't have the following DVCS in-house for Rhel5 (could look to
# EPEL but not very up-to-date)
%if %{dvcs_tests}
BuildRequires:  bzr
BuildRequires:  git
%if 0%{?fedora}
BuildRequires:  bazaar
%ifarch {ix86}
# looks like darcs is not available outside ix86
BuildRequires:  darcs
%endif
BuildRequires:  tla
%endif
%endif
%endif

Requires:       python-twisted-core
Requires:       python-twisted-web
Requires:       python-twisted-mail
Requires:       python-twisted-words
Requires(post):  /sbin/install-info
Requires(preun): /sbin/install-info

%description
The BuildBot is a system to automate the compile/test cycle required by
most software projects to validate code changes. By automatically
rebuilding and testing the tree each time something has changed, build
problems are pinpointed quickly, before other developers are
inconvenienced by the failure.

%prep
#%setup -q -n %{srctarball}
%setup -q -n %{name}-%{version}

# Make rpmlint happy and kill all unnecessary shebangs.
# Mainly done upstream in 0.7.10p1 except for buildbot/test/subdir/emit.py
find buildbot/test -name "*.py" | \
  xargs %{__perl} -ni -e 'print unless /usr\/bin\/python/'

chmod -x contrib/bzr_buildbot.py

# Clean up Windows contribs
sed -i 's/\r//' contrib/windows/*
chmod -x contrib/windows/*

rm -f docs/images/.gitignore

%build
%{__python} setup.py build
# No need to build info & html doc files, they are now delivered
#pushd docs
#make buildbot.info
#popd

%install
rm -rf %{buildroot}
%{__python} setup.py install -O1 --skip-build --root %{buildroot}

install -d %{buildroot}%{_datadir}/%{name}
cp -a contrib %{buildroot}%{_datadir}/%{name}/

# Deliver info files to their final resting place
install -d %{buildroot}%{_infodir}
install -m 644 docs/buildbot.info* %{buildroot}%{_infodir}/
rm -f docs/buildbot.info*

%if %{tests}
%check
PYTHONPATH="%{buildroot}%{python_sitelib}" trial buildbot.test || :
%endif

%clean
rm -rf %{buildroot}

# The entry contains tabs, don't kill them
%post
/sbin/install-info --entry="* buildbot: (buildbot).		Build/test automation system" 
/usr/share/info/buildbot.info.gz %{_infodir}/dir ||:

%preun
if [ $1 -eq 0 ]; then
  /sbin/install-info --delete /usr/share/info/buildbot.info.gz %{_infodir}/dir ||:
fi

%files
%defattr(-,root,root,-)
%doc ChangeLog* COPYING CREDITS NEWS README docs/*
%{_bindir}/buildbot
%{python_sitelib}/*
%{_datadir}/%{name}
%{_infodir}/*.info*


%changelog
* Fri Jan 22 2010 Gareth Armstrong <gareth.armstrong@...> - 0.7.12-1.oc
- Update to 0.7.12
- No longer build info files as they are now delivered

* Tue Jan 19 2010 Gareth Armstrong <gareth.armstrong@...> - 0.7.12-0.3.rc4.oc
- Update to 0.7.12rc4

* Mon Jan 11 2010 Gareth Armstrong <gareth.armstrong@...> - 0.7.12-0.2.rc2.oc
- Update to 0.7.12rc2

* Tue Jan  5 2010 Gareth Armstrong <gareth.armstrong@...> - 0.7.12-0.1.rc1.oc
- Update to 0.7.12rc1
- Drop all patches as they are now upstream

* Wed Nov 25 2009 Gareth Armstrong <gareth.armstrong@...> - 0.7.11p3-2.oc
- Backport cumulative patch to deliver upstream buildslavedir feature

* Tue Aug 18 2009 Gareth Armstrong <gareth.armstrong@...> - 0.7.11p3-1.oc
- Update to 0.7.11p3 to fix cross site scripting vulnerabilities
- Add a cumulative patch for upstream fixes to feeds.py
- Add a cumulative patch from upstream to list urls in the build property page

* Fri Jul 17 2009 Gareth Armstrong <gareth.armstrong@...> - 0.7.11p1-2.oc
- Add patch from upstream to call head() on the StatusResource pages
  only once per request

* Fri Jul 17 2009 Gareth Armstrong <gareth.armstrong@...> - 0.7.11p1-1.oc
- Update to 0.7.11p1
- Drop feeds patch, now upstream
- Update SOURCE0 URI to point to pypi
- Build and deliver the buildbot.info* files and add BR on texinfo
- Folow Fedora SRPM lead and enable tests by default but don't force
  Buildrequires on various DVCS that we don't have in-house

* Mon Mar 23 2009 Gareth Armstrong <gareth.armstrong@...>  - 0.7.10p1-2.oc
- Add my patch to upstream to fix Feeds when title=None

* Sun Mar 15 2009 Gareth Armstrong <gareth.armstrong@...> - 0.7.10p1-1.oc
- Update to  0.7.10p1, tweak documentation delivered
- Follow Fedora Rawhide's buildbot SRPM and add various DVCS to
  conditionalized BRs needed for %%check,
- Most of these SCM are commented out for the moment because they are
  not standard on Rhel5.  Testing is not enabled by default, the test
  must be enabled in addtion to the base tests , i.e.
  rpmbuild -bb --with tests --with scm_tests buildbot.spec

* Fri Jul 25 2008 Gareth Armstrong <gareth.armstrong@...> - 0.7.8-1.oc
- Update to 0.7.8

* Tue May 13 2008 Gareth Armstrong <gareth.armstrong@...> - 0.7.7-3.oc
- First import of buildbot from Fedora Rawhide into OpenCall internals repo
- Minor tweaks to spec file
- Drop shebang patch and replace with a perl expression
- Add conditional (--with tests) to enable %%check section, off by default
- Deliver info files correctly but manually add info dir entry as main 
  buildbot.info file doesn't have one

* Thu Apr  3 2008 Gianluca Sforna <giallu gmail com> - 0.7.7-2
- Fix upgrade path

* Mon Mar 31 2008 Gianluca Sforna <giallu gmail com> - 0.7.7-1
- new upstream release

* Thu Jan  3 2008 Gianluca Sforna <giallu gmail com> - 0.7.6-2
- pick up new .egg file 

* Mon Oct 15 2007 Gianluca Sforna <giallu gmail com> - 0.7.6-1
- new upstream release
- refreshed Patch0
- requires clean up
- License tag update (GPLv2)

* Sat Mar 17 2007 Gianluca Sforna <giallu gmail com>
- Silence rpmlint

* Thu Mar 01 2007 Gianluca Sforna <giallu gmail com> - 0.7.5-1
- new upstream release
- minor spec tweaks
- Removed (unmantained and orphaned) python-cvstoys Require

* Sat Sep 09 2006 Michael J. Knox <michael[AT]knox.net.nz> - 0.7.4-2
- cleanup %%files

* Fri Sep 08 2006 Michael J. Knox <michael[AT]knox.net.nz> - 0.7.4-1
- Upstream update
- don't ghost pyo files

* Fri Jul 28 2006 Michael J. Knox <michael[AT]knox.net.nz> - 0.7.3-3
- move contribs to %%{_datadir}/%{name}

* Fri Jul 07 2006 Michael J. Knox <michael[AT]knox.net.nz> - 0.7.3-2
- fixes for review
- added patch to remove #! where its not needed (shutup rpmlint)

* Sun Jun 02 2006 Michael J. Knox <michael[AT]knox.net.nz> - 0.7.3-1
- Inital build for FE
%{!?python:%global python python}
%{!?python_sitearch: %global python_sitearch %(%{python} -c "from distutils.sysconfig import
get_python_lib; print get_python_lib(1)")}

%global tarballname TwistedCore

#====================================================================#

Name:     %{python}-twisted-core
Version:  10.0.0
Release:  1.oc%{?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/Core/10.0/%{tarballname}-%{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:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRequires:  %{python}-devel
BuildRequires:  %{python}-zope-interface >= 3.0.1
Requires:       %{python}-zope-interface >= 3.0.1
Requires:       pyOpenSSL

%description
Twisted Core is part of Twisted, a networking engine written in
Python, supporting numerous protocols. Twisted Core is an asynchronous
event loop and associated utilities, supporting TCP, UDP, multicast,
SSL/TLS, serial communication and more. It is used by most of the
servers, clients and protocols that are part of other Twisted
projects.

The core "minimal" distribution contains a number of modules:

  * twisted.internet, the Twisted event loop;
  * twisted.cred, a pluggable authentication system for servers;
  * twisted.enterprise, an asynchronous adaptor of Python DB-API 2.0
    database interfaces;
  * twisted.manhole, a debugging service;
  * twisted.persisted, a collection of object persistence systems
  * twisted.protocols, a collection of helper protocols (such as a
    line-oriented helper, a length-prefixed helper, a netstrings
    helper, etc);
  * twisted.python, a set of Twisted programming abstractions;
  * twisted.spread, a network transport, serializer and object broker;
  * twisted.trial, a unit-testing framework

%package doc
Summary:   Documentation for Twisted Core
Group:     Documentation
Requires:  %{python}-twisted-core = %{version}-%{release}

%description doc
Documentation for Twisted Core.

%package zsh
Summary:   Tab completion for Zsh and Twisted Core
Group:     System Environment/Shells
Requires:  %{python}-twisted-core = %{version}-%{release}
Requires:  zsh

%description zsh
Tab completions for Zsh and Twisted Core.

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

# Make rpmlint happy
%{__perl} -ni -e 'print unless /^#!\s?\/usr\/bin\/env\s+python$/' \
twisted/trial/test/scripttest.py

find doc -name \*.py -o -name \*.tac | xargs chmod a-x
#chmod a-x doc/howto/listings/pb/copy_receiver.tac
sed -i -e 's/\r//' doc/howto/listings/udp/MulticastClient.py
sed -i -e 's/\r//' doc/howto/listings/udp/MulticastServer.py

# Generate a brief README.zsh
awk '/^Zsh Notes:/,/^Have fun!/' twisted/python/zshcomp.py > README.zsh

# Make rpmlint a little happier
/usr/bin/iconv --from-code=ISO-8859-1 --to-code=UTF-8 \
  --output=CREDITS.UTF8 CREDITS
mv CREDITS.UTF8 CREDITS

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

%install
rm -rf %{buildroot}
%{python} setup.py install --skip-build -O1 --root %{buildroot}

# cfsupport is support for MacOSX Core Foundations, so we can delete it
rm -rf %{buildroot}%{python_sitearch}/twisted/internet/cfreactor.py*
rm -rf %{buildroot}%{python_sitearch}/twisted/internet/cfsupport

# iocpreactor is a win32 reactor, so we can delete it
rm -rf %{buildroot}%{python_sitearch}/twisted/internet/iocpreactor

# Man pages
install -d %{buildroot}%{_mandir}/man1/
install -m 644 doc/man/*.1 %{buildroot}%{_mandir}/man1/
rm -rf doc/man/*.1

# Zsh tab complete stub (à la teratorn)
install -d %{buildroot}%{_datadir}/zsh/site-functions
install -m 644 twisted/python/_twisted_zsh_stub %{buildroot}%{_datadir}/zsh/site-functions/_twisted_zsh_stub

# Some of the zsh completions are no longer appropriate
find %{buildroot}%{python_sitearch}/twisted/python/zsh -size 0c -exec rm -f {} \;

# script to regenerate dropin.cache
install -d %{buildroot}%{_libexecdir}
install -m 755 %{SOURCE1} %{buildroot}%{_libexecdir}

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/python/_initgroups.c
rm -f %{buildroot}%{python_sitearch}/twisted/test/raiser.c

# 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

%clean
rm -rf %{buildroot}

%post
%{_libexecdir}/twisted-dropin-cache || :

%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}/tap2deb
%{_bindir}/tap2rpm
%{_bindir}/tapconvert
%{_bindir}/trial
%{_bindir}/twistd
%{_libexecdir}/twisted-dropin-cache
%{_mandir}/man1/*
%{python_sitearch}/twisted/

%files doc
%defattr(-,root,root,-)
%doc doc/*

%files zsh
%defattr(-,root,root,-)
%doc README.zsh
%{_datadir}/zsh/site-functions/_twisted_zsh_stub

%changelog
* Tue Mar 23 2010 Gareth Armstrong <gareth.armstrong@...> - 10.0.0-1.oc
- Update to 10.0.0
- Remove BRs on sed and awk

* Wed Dec 16 2009 Gareth Armstrong <gareth.armstrong@...> - 9.0.0-1.oc
- Update to 9.0.0
- Minor tweaks to spec file

* Tue Jan  6 2009 Gareth Armstrong  <gareth.armstrong@...> - 8.2.0-1.oc
- Update to 8.2.0
- Align description with TwistedMatrix web site
- Drop %%{_bindir}/t-im
- Some tweaks to spec file to align with Fedora rawhide Twisted pkgs
  which are now up-to-date and follow latest guidelines

* Tue May 20 2008 Gareth Armstrong <gareth.armstrong@...> - 8.1.0-1.oc
- Update to 8.1.0
- Minor tweaks to spec file

* Fri May  9 2008 Gareth Armstrong <gareth.armstrong@...> - 8.0.1-1.oc
- First import of python-twisted-core from Fedora Rawhide into OpenCall internals repo
- Update to 8.0.1
- Simplify twisted delivery in %%files to just %%{python_sitearch}/twisted/
- Deliver new %%{_bindir}/pyhtmlizer and %%{_bindir}/t-im
- Get rid of borked modif to _twisted_zsh_stub and use original from tarball

* Fri Mar 07 2008 Jesse Keating <jkeating@...> - 2.5.0-4
- Handle egg, drop pyver stuff, attempt to fix the multiple file listings

* Wed Feb 20 2008 Fedora Release Engineering
<rel-eng@...> - 2.5.0-3
- Autorebuild for GCC 4.3

* Fri Aug 31 2007 Thomas Vander Stichele <thomas at apestaart dot org>
- 2.5.0-2
- add sed and awk as buildrequires

* Thu Aug 23 2007 Thomas Vander Stichele <thomas at apestaart dot org>
- 2.5.0-1
- updated to newest version
- remove twisted/spread/*.so
- added epoll.so

* Tue Dec 26 2006 Thomas Vander Stichele <thomas at apestaart dot org>
- 2.4.0-6
- new twisted-dropin-cache; does not complain loudly about plugins in
  the cache that are no longer installed

* Tue Nov 07 2006 Thomas Vander Stichele <thomas at apestaart dot org>
- 2.4.0-5
- incorporate suggestions by Paul Howarth:
- fix groups for doc and zsh
- don't package _twisted_zsh_stub from the python_sitearch dir
- generate README.zsh

* Wed Nov 01 2006 Thomas Vander Stichele <thomas at apestaart dot org>
- 2.4.0-4
- incorporate changes by Jeffrey C. Ollie:
- add doc and zsh subpackage
- remove executable bits from documentation files to avoid dependencies
- remove shebang from some files
- fix up end of line on some files
- remove .c files from being packaged

* Tue Sep 26 2006 Thomas Vander Stichele <thomas at apestaart dot org>
- 2.4.0-3
- no longer ghost .pyo files

* Fri Jun 09 2006 Thomas Vander Stichele <thomas at apestaart dot org>
- 2.4.0-2
- add twisted-dropin-cache script and use it
- ghost the dropin.cache file

* Wed Jun 07 2006 Thomas Vander Stichele <thomas at apestaart dot org>
- 2.4.0-1
- upstream release
- require pyOpenSSL as it is named in Extras

* Mon Oct 10 2005 Jeff Pitman <symbiont+pyvault@...> 2.1.0-1
- upstream release

* Tue Aug 23 2005 Jeff Pitman <symbiont+pyvault@...> 2.0.1-1
- upstream release

* Mon Apr 04 2005 Jeff Pitman <symbiont+pyvault@...> 2.0.0-2
- add zsh support

* Fri Mar 25 2005 Jeff Pitman <symbiont+pyvault@...> 2.0.0-1
- final release

* Thu Mar 17 2005 Jeff Pitman <symbiont+pyvault@...> 2.0.0-0.2.a3
- dropped web2

* Wed Mar 16 2005 Jeff Pitman <symbiont+pyvault@...> 2.0.0-0.1.a3
- upstream release

* Sat Mar 12 2005 Jeff Pitman <symbiont+pyvault@...> 2.0.0-0.1.a2
- new prerelease; FE versioning

* Mon Feb 07 2005 Jeff Pitman <symbiont+pyvault@...> 2.0.0a1-1
- prep for split

* Fri Aug 20 2004 Jeff Pitman <symbiont+pyvault@...> 1.3.0-1
- new version

* Mon Apr 19 2004 Jeff Pitman <symbiont+pyvault@...> 1.2.0-3
- vaultize

* Mon Apr 12 2004 Jeff Pitman <symbiont+pyvault@...> 1.2.0-2
- require pyOpenSSL, SOAPpy, openssh-clients, crypto, dia so trial can run

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

%global tarballname TwistedMail

#====================================================================#

Name:     %{python}-twisted-mail
Version:  10.0.0
Release:  1.oc%{?dist}
Summary:  Twisted SMTP, IMAP and POP protocol implementations with clients and servers

Group:    Development/Libraries
License:  MIT
URL:      http://twistedmatrix.com/trac/wiki/TwistedMail
Source0:  http://tmrc.mit.edu/mirror/twisted/Mail/10.0/%{tarballname}-%{version}.tar.bz2

BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRequires:  %{python}-twisted-core >= %{version}
BuildRequires:  %{python}-devel
Requires:       %{python}-twisted-core >= %{version}
Requires:       %{python}-twisted-names >= %{version}
Requires(post):   %{_libexecdir}/twisted-dropin-cache
Requires(postun): %{_libexecdir}/twisted-dropin-cache

# a noarch-turned-arch package should not have debuginfo
%global debug_package %{nil}

%description
Twisted Mail is part of Twisted, a networking engine written in
Python, supporting numerous protocols. Twisted Mail contains
high-level, efficient protocol implementations for both clients and
servers of SMTP, POP3, and IMAP4. Additionally, it contains an "out of
the box" combination SMTP/POP3 virtual-hosting mail server. Also
included is a read/write Maildir implementation and a basic Mail
Exchange calculator (depends on Twisted Names).

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

# Make rpmlint happy
%{__perl} -ni -e 'print unless /^#!\s?\/usr\/bin\/env\s+python$/' \
  twisted/mail/test/pop3testserver.py

%build
%{python} setup.py build

%install
rm -rf %{buildroot}
# This is a pure python package, but extending the twisted namespace
# from python-twisted-core, which is arch-specific, so it needs to go
# in sitearch
%{python} setup.py install -O1 --skip-build \
    --install-purelib %{python_sitearch} --root %{buildroot}

# Man pages
install -d %{buildroot}%{_mandir}/man1
install -m 644 doc/man/*.1 %{buildroot}%{_mandir}/man1/
rm -f doc/man/*.1

# 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

%clean
rm -rf %{buildroot}

%post
%{_libexecdir}/twisted-dropin-cache || :

%postun
%{_libexecdir}/twisted-dropin-cache || :

%files -f egg-info
%defattr(-,root,root,-)
%doc LICENSE NEWS README doc/*
%{_bindir}/mailmail
%{_mandir}/man1/*
%{python_sitearch}/twisted/mail/
%{python_sitearch}/twisted/plugins/


%changelog
* Tue Mar 23 2010 Gareth Armstrong <gareth.armstrong@...> - 10.0.0-1.oc
- Update to 10.0.0

* Thu Dec 17 2009 Gareth Armstrong <gareth.armstrong@...> - 9.0.0-1.oc
- Update to 9.0.0
- Minor tweaks to spec file

* Wed Jan  7 2009 Gareth Armstrong <gareth.armstrong@...> - 8.2.0-1.oc
- Update to 8.2.0
- Rework description to align with TwistedMatrix web site
- Add scriptlet Requires on %%{_libexecdir}/twisted-dropin-cache
- Some tweaks to spec file to align with Fedora rawhide Twisted pkgs
  which are now up-to-date and follow latest guidelines

* Tue May 20 2008 Gareth Armstrong <gareth.armstrong@...> - 8.1.0-1.oc
- Update to 8.1.0

* Tue May 13 2008 Gareth Armstrong <gareth.armstrong@...> - 8.0.0-1.oc
- First import of python-twisted-mail from Fedora Rawhide into OpenCall internals repo
- Update to 8.0.0
- Minor tweaks to spec file

* Fri Mar 07 2008 Jesse Keating <jkeating@...> - 0.4.0-4
- Fix the egg issue, drop the pyver stuff.

* Wed Feb 20 2008 Fedora Release Engineering
<rel-eng@...> - 0.4.0-2
- Autorebuild for GCC 4.3

* Fri Aug 31 2007 Thomas Vander Stichele <thomas at apestaart dot org>
- 0.4.0-1
- new version

* Wed Jan 03 2007 Thomas Vander Stichele <thomas at apestaart dot org>
- 0.3.0-4
- add python-devel BR
- add docs

* Wed Nov 01 2006 Thomas Vander Stichele <thomas at apestaart dot org>
- 0.3.0-3
- make script with shebang executable

* Tue Sep 26 2006 Thomas Vander Stichele <thomas at apestaart dot org>
- 0.3.0-2
- no longer ghost .pyo files
- rebuild the dropin.cache

* Wed Jun 07 2006 Thomas Vander Stichele <thomas at apestaart dot org>
- 0.3.0-1
- new release
- remove noarch

* Tue Aug 23 2005 Jeff Pitman <symbiont+pyvault@...> 0.1.0-2
- disttag

* Fri Mar 25 2005 Jeff Pitman <symbiont+pyvault@...> 0.1.0-1
- final release

* Wed Mar 16 2005 Jeff Pitman <symbiont+pyvault@...> 0.1.0-0.1.a3
- upstream release

* Sat Mar 12 2005 Jeff Pitman <symbiont+pyvault@...> 0.1.0-0.1.a2
- prerelease; FE versioning

* Mon Feb 07 2005 Jeff Pitman <symbiont+pyvault@...> 0.1.0-1
- prep for split

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

%global tarballname TwistedNames

#====================================================================#

Name:     %{python}-twisted-names
Version:  10.0.0
Release:  1.oc%{?dist}
Summary:  Twisted DNS protocol implementation with client and server

Group:    Development/Libraries
License:  MIT
URL:      http://twistedmatrix.com/trac/wiki/TwistedNames
Source0:  http://tmrc.mit.edu/mirror/twisted/Names/10.0/TwistedNames-%{version}.tar.bz2

BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRequires:  %{python}-twisted-core >= %{version}
BuildRequires:  %{python}-devel
Requires:       %{python}-twisted-core >= %{version}
Requires(post):   %{_libexecdir}/twisted-dropin-cache
Requires(postun): %{_libexecdir}/twisted-dropin-cache

# a noarch-turned-arch package should not have debuginfo
%global debug_package %{nil}

%description
Twisted Names is part of Twisted, a networking engine written in
Python, supporting numerous protocols.  Twisted Names is both a domain
name server as well as a client resolver library. Twisted Names comes
with an "out of the box" nameserver which can read most BIND-syntax
zone files as well as a simple Python-based configuration
format. Twisted Names can act as an authoritative server, perform zone
transfers from a master to act as a secondary, act as a caching
nameserver, or any combination of these. Twisted Names' client
resolver library provides functions to query for all commonly used
record types as well as a replacement for the blocking gethostbyname()
function provided by the Python stdlib socket module.

%prep
%setup -q -n %{tarballname}-%{version}
chmod 644 doc/examples/*.py

%build
%{python} setup.py build

%install
rm -rf %{buildroot}
# This is a pure python package, but extending the twisted namespace
# from python-twisted-core, which is arch-specific, so it needs to go
# in sitearch
%{python} setup.py install -O1 --skip-build \
    --install-purelib %{python_sitearch} --root %{buildroot}

# 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

%clean
rm -rf %{buildroot}

%post
%{_libexecdir}/twisted-dropin-cache || :

%postun
%{_libexecdir}/twisted-dropin-cache || :

%files -f egg-info
%defattr(-,root,root,-)
%doc LICENSE NEWS README doc/*
%{python_sitearch}/twisted/names/
%{python_sitearch}/twisted/plugins/


%changelog
* Tue Mar 23 2010 Gareth Armstrong <gareth.armstrong@...> - 10.0.0-1.oc
- Update to 10.0.0

* Thu Dec 17 2009 Gareth Armstrong <gareth.armstrong@...> - 9.0.0-1.oc
- Update to 9.0.0
- Minor tweaks to spec file

* Tue Jan  6 2009 Gareth Armstrong <gareth.armstrong@...> - 8.2.0-1.oc
- Update to 8.2.0
- Align description with TwistedMatrix web site
- Add scriptlet Requires on %%{_libexecdir}/twisted-dropin-cache
- Some tweaks to spec file to align with Fedora rawhide Twisted pkgs
  which are now up-to-date and follow latest guidelines

* Tue May 20 2008 Gareth Armstrong <gareth.armstrong@...> - 8.1.0-1.oc
- Update to 8.1.0

* Tue May 13 2008 Gareth Armstrong <gareth.armstrong@...> - 8.0.0-1.oc
- First import of python-twisted-names from Fedora Rawhide into OpenCall internals repo
- Update to 8.0.0
- Minor tweaks to spec file

* Fri Mar 07 2008 Jesse Keating <jkeating@...> - 0.4.0-3
- Fix the egg info, drop the pyver stuff.

* Wed Feb 20 2008 Fedora Release Engineering
<rel-eng@...> - 0.4.0-2
- Autorebuild for GCC 4.3

* Fri Aug 31 2007 Thomas Vander Stichele <thomas at apestaart dot org>
- 0.4.0-1
- updated to latest version

* Thu Dec 14 2006 Thomas Vander Stichele <thomas at apestaart dot org>
- 0.3.0-3
- add python-devel BR
- chmod the examples

* Tue Sep 26 2006 Thomas Vander Stichele <thomas at apestaart dot org>
- 0.3.0-2
- no longer ghost .pyo files
- rebuild dropin.cache

* Wed Jun 07 2006 Thomas Vander Stichele <thomas at apestaart dot org>
- 0.3.0-1
- new upstream release
- remove noarch
- remove dependency on flow

* Tue Aug 23 2005 Jeff Pitman <symbiont+pyvault@...> 0.1.0-2
- disttag

* Fri Mar 25 2005 Jeff Pitman <symbiont+pyvault@...> 0.1.0-1
- final release

* Wed Mar 16 2005 Jeff Pitman <symbiont+pyvault@...> 0.1.0-0.1.a3
- upstream release

* Sat Mar 12 2005 Jeff Pitman <symbiont+pyvault@...> 0.1.0-0.1.a2
- prerelease; FE versioning

* Mon Feb 07 2005 Jeff Pitman <symbiont+pyvault@...> 0.1.0-1
- prep for split

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

%global tarballname TwistedWeb

#====================================================================#

Name:     %{python}-twisted-web
Version:  10.0.0
Release:  1.oc%{?dist}
Summary:  Twisted HTTP protocol implementation together with clients and servers

Group:    Development/Libraries
License:  MIT
URL:      http://twistedmatrix.com/trac/wiki/TwistedWeb
Source0:  http://tmrc.mit.edu/mirror/twisted/Web/10.0/%{tarballname}-%{version}.tar.bz2

BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRequires:  %{python}-twisted-core >= %{version}
BuildRequires:  %{python}-devel
Requires:       %{python}-twisted-core >= %{version}
Requires:       SOAPpy
Requires(post):   %{_libexecdir}/twisted-dropin-cache
Requires(postun): %{_libexecdir}/twisted-dropin-cache

# a noarch-turned-arch package should not have debuginfo
%global debug_package %{nil}

%description
Twisted Web is part of Twisted, a networking engine written in Python,
supporting numerous protocols. Twisted Web includes an HTTP server and
an HTTP client and additional libraries often useful in conjunction
with these.

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

%build
%{python} setup.py build

%install
rm -rf %{buildroot}
# This is a pure python package, but extending the twisted namespace
# from python-twisted-core, which is arch-specific, so it needs to go
# in sitearch
%{python} setup.py install -O1 --skip-build \
    --install-purelib %{python_sitearch} --root %{buildroot}

# 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

%clean
rm -rf %{buildroot}

%post
%{_libexecdir}/twisted-dropin-cache || :

%postun
%{_libexecdir}/twisted-dropin-cache || :

%files -f egg-info
%defattr(-,root,root,-)
%doc LICENSE NEWS README doc/*
%{python_sitearch}/twisted/web/
%{python_sitearch}/twisted/plugins/


%changelog
* Tue Mar 23 2010 Gareth Armstrong <gareth.armstrong@...> - 10.0.0-1.oc
- Update to 10.0.0

* Thu Dec 17 2009 Gareth Armstrong <gareth.armstrong@...> - 9.0.0-1.oc
- Update to 9.0.0
- Minor tweaks to spec file

* Tue Jan  6 2009 Gareth Armstrong <gareth.armstrong@...> - 8.2.0-1.oc
- Update to 8.2.0
- Align description with TwistedMatrix web site
- Add scriptlet Requires on %%{_libexecdir}/twisted-dropin-cache
- Some tweaks to spec file to align with Fedora rawhide Twisted pkgs
  which are now up-to-date and follow latest guidelines

* Tue May 20 2008 Gareth Armstrong <gareth.armstrong@...> - 8.1.0-1.oc
- Update to 8.1.0

* Tue May 13 2008 Gareth Armstrong <gareth.armstrong@...> - 8.0.0-1.oc
- First import of python-twisted-web from Fedora Rawhide into OpenCall internals repo
- Update to 8.0.0
- Minor tweaks to spec file

* Fri Mar 07 2008 Jesse Keating <jkeating@...> - 0.7.0-3
- Handle egg issue, drop the pyver stuff.

* Wed Feb 20 2008 Fedora Release Engineering
<rel-eng@...> - 0.7.0-2
- Autorebuild for GCC 4.3

* Fri Aug 31 2007 Thomas Vander Stichele <thomas at apestaart dot org>
- 0.7.0-1
- updated to new version
- updated core requires
- removed websetroot

* Fri Dec 22 2006 Jef Spaleta <jspaleta@...>
- 0.6.0-4
- Docs and Url fixes as suggested in the review
- Added BR for python-devel for python 2.5, merry Christmas!

* Wed Nov 01 2006 Thomas Vander Stichele <thomas at apestaart dot org>
- 0.6.0-3
- remove shebang lines from unit test files

* Tue Sep 26 2006 Thomas Vander Stichele <thomas at apestaart dot org>
- 0.6.0-2
- no longer ghost .pyo files
- rebuild dropin.cache

* Wed Jun 07 2006 Thomas Vander Stichele <thomas at apestaart dot org>
- 0.6.0-1
- update to new release
- remove NoArch
- change dep to SOAPpy as it is called in extras

* Tue Aug 23 2005 Jeff Pitman <symbiont+pyvault@...> 0.5.0-2
- disttag

* Wed Mar 16 2005 Jeff Pitman <symbiont+pyvault@...> 0.5.0-0.1.a3
- upstream release

* Sat Mar 12 2005 Jeff Pitman <symbiont+pyvault@...> 0.5.0-0.1.a2
- prerelease; FE versioning

* Mon Feb 07 2005 Jeff Pitman <symbiont+pyvault@...> 0.1.0-1
- prep for split

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

%global tarballname TwistedWords

#====================================================================#

Name:     %{python}-twisted-words
Version:  10.0.0
Release:  1.oc%{?dist}
Summary:  Twisted chat and instant messaging implementations

Group:    Development/Libraries
License:  MIT
URL:      http://twistedmatrix.com/trac/wiki/TwistedWords
Source0:  http://tmrc.mit.edu/mirror/twisted/Words/10.0/%{tarballname}-%{version}.tar.bz2

BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRequires:  %{python}-twisted-core >= %{version}
BuildRequires:  %{python}-devel
Requires:       %{python}-twisted-core >= %{version}
Requires:       %{python}-twisted-web >= %{version}
Requires(post):   %{_libexecdir}/twisted-dropin-cache
Requires(postun): %{_libexecdir}/twisted-dropin-cache

# a noarch-turned-arch package should not have debuginfo
%global debug_package %{nil}

%description
Twisted Words is part of Twisted, a networking engine written in
Python, supporting numerous protocols. Twisted Words provides two
separate high-level end-user features:

  * a multiprotocol instant messaging server
  * a multiprotocol instant messaging client 

These are both still in the early stages of development and are not
expected to work flawlessly in all configurations, however each is
quite usable for a limited set of functionality. The Twisted Words
client is named 'im' and is usable as an IRC client, and possibly an
AIM client (depending on the phase of the moon).

Twisted Words also includes:

  * Low-level protocol implementations of OSCAR (AIM and ICQ), IRC,
    MSN, TOC (AIM).
  * Jabber libraries.
  * Prototypes of chat server and client frameworks built on top of
    the protocols.

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

# Make rpmlint happy
chmod 644 doc/examples/oscardemo.py
# Remove im documentation as im is no longer delivered
rm -rf doc/man

%build
%{python} setup.py build

%install
rm -rf %{buildroot}
# This is a pure python package, but extending the twisted namespace
# from python-twisted-core, which is arch-specific, so it needs to go
# in sitearch
%{python} setup.py install -O1 --skip-build \
    --install-purelib %{python_sitearch} --root %{buildroot}

# 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

%clean
rm -rf %{buildroot}

%post
%{_libexecdir}/twisted-dropin-cache || :

%postun
%{_libexecdir}/twisted-dropin-cache || :

%files -f egg-info
%defattr(-,root,root,-)
%doc LICENSE NEWS README doc/*
%{python_sitearch}/twisted/words/
%{python_sitearch}/twisted/plugins/


%changelog
* Tue Mar 23 2010 Gareth Armstrong <gareth.armstrong@...> - 10.0.0-1.oc
- Update to 10.0.0

* Thu Dec 17 2009 Gareth Armstrong <gareth.armstrong@...> - 9.0.0-1.oc
- Update to 9.0.0
- Minor tweaks to spec file
- Removed "im" documentation because "im" gui application is no longer delivered

* Tue Jan  6 2009 Gareth Armstrong <gareth.armstrong@...> - 8.2.0-1.oc
- Update to 8.2.0
- Align description with TwistedMatrix web site
- Add scriptlet Requires on %%{_libexecdir}/twisted-dropin-cache
- Some tweaks to spec file to align with Fedora rawhide Twisted pkgs
  which are now up-to-date and follow latest guidelines

* Tue May 20 2008 Gareth Armstrong <gareth.armstrong@...> - 8.1.0-1.oc
- Update to 8.1.0

* Tue May 13 2008 Gareth Armstrong <gareth.armstrong@...> - 8.0.0-1.oc
- First import of python-twisted-words from Fedora Rawhide into OpenCall internals repo
- Update to 8.0.0
- Minor tweaks to spec file

* Fri Mar 07 2008 Jesse Keating <jkeating@...> - 0.5.0-3
- Handle the egg issue, drop the pyver stuff.

* Wed Feb 20 2008 Fedora Release Engineering
<rel-eng@...> - 0.5.0-2
- Autorebuild for GCC 4.3

* Fri Aug 31 2007 Thomas Vander Stichele <thomas at apestaart dot org>
- 0.5.0-1
- updated to latest version

* Wed Dec 27 2006 Thomas Vander Stichele <thomas at apestaart dot org>
- 0.4.0-3
- BR python-devel
- include LICENSE and NEWS

* Tue Sep 26 2006 Thomas Vander Stichele <thomas at apestaart dot org>
- 0.4.0-2
- no longer ghost .pyo files
- rebuild dropin.cache

* Wed Jun 07 2006 Thomas Vander Stichele <thomas at apestaart dot org>
- 0.4.0-1
- new release
- remove xish dependency
- remove noarch

* Tue Aug 23 2005 Jeff Pitman <symbiont+pyvault@...> 0.1.0-2
- disttag

* Wed Mar 16 2005 Jeff Pitman <symbiont+pyvault@...> 0.1.0-0.1.a3
- upstream release

* Sat Mar 12 2005 Jeff Pitman <symbiont+pyvault@...> 0.1.0-0.1.a2
- prerelease; FE versioning

* Mon Feb 07 2005 Jeff Pitman <symbiont+pyvault@...> 0.1.0-1
- prep for split

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

#====================================================================#

Name:       python-zope-interface
Version:    3.5.3
Release:    1.oc%{?dist}
Summary:    Interfaces for Python

Group:      Development/Libraries
License:    ZPLv2.1
URL:        http://pypi.python.org/pypi/zope.interface
Source0:    http://pypi.python.org/packages/source/z/zope.interface/zope.interface-%{version}.tar.gz
Source1:    ZPL-2.1.txt

BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRequires:  python-devel
# zope.interface 3.5.0 won't build the C extension if distutils are used
BuildRequires:  python-setuptools-devel
Requires:       python-zope-filesystem

%description
This package provides an implementation of object interfaces for
Python. Interfaces are a mechanism for labeling objects as conforming
to a given API or contract. So, this package can be considered as
implementation of the Design By Contract methodology support in
Python.

This package is intended to be independently reusable in any Python
project. It is maintained by the Zope Toolkit project.

%prep
%setup -n zope.interface-%{version} -q
%{__cp} -a %{SOURCE1} .

# Tests require additional modules and shouldn't be packaged
%{__rm} -rfv src/zope/interface/tests/
%{__rm} -rfv src/zope/interface/common/tests/


%build
CFLAGS="%{optflags}" %{__python} setup.py build

%install
%{__rm} -rf %{buildroot}
%{__python} setup.py install -O1 --skip-build --root  %{buildroot}

# Will put docs in %{_docdir} instead
%{__rm} -f %{buildroot}%{python_sitearch}/zope/interface/*.txt

# C files don't need to be packaged
%{__rm} -f %{buildroot}%{python_sitearch}/zope/interface/_zope_interface_coptimizations.c

%check
# Skipped; would require zope.testing, which isn't in Fedora yet

%clean
%{__rm} -rf %{buildroot}

%files
%defattr(-,root,root,-)
%doc ZPL-2.1.txt src/zope/interface/*.txt
%{python_sitearch}/zope/*
%{python_sitearch}/zope.interface*

%changelog
* Fri Apr  2 2010 Gareth Armstrong <gareth.armstrong@...> - 3.5.3-1.oc
- Update to 3.5.3
- First import of python-zope-interface from Fedora 12 into CMS internals repo
- Minor tweaks to spec file and aligned description with that of PyPi

* Sun Jul 26 2009 Fedora Release Engineering
<rel-eng@...> - 3.5.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Sun Jul 05 2009 Felix Schwarz <felix.schwarz@...> 3.5.2-1
- update to 3.5.2

* Mon Jun 01 2009 Luke Macken <lmacken@...> 3.5.1-3
- Add python-setuptools-devel to the BuildRequires, so we generate egg-info

* Sun Apr 05 2009 Felix Schwarz <felix.schwarz@...> 3.5.1-2
- use correct source filename (upstream switched from zip to tar.gz)

* Sun Apr 05 2009 Felix Schwarz <felix.schwarz@...> 3.5.1-1
- update to 3.5.1

* Thu Feb 26 2009 Fedora Release Engineering
<rel-eng@...> - 3.5.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Wed Dec 17 2008 Conrad Meyer <konrad@...> - 3.5.0-3
- Make compatible with the new python-zope-filesystem.

* Sat Nov 29 2008 Ignacio Vazquez-Abrams
<ivazqueznet+rpm@...> - 3.5.0-2
- Rebuild for Python 2.6

* Sat Nov 15 2008 Felix Schwarz <felix.schwarz@...> 3.5.0-1
- update to 3.5.0

* Mon Mar 31 2008 Paul Howarth <paul@...> 3.4.1-1
- update to 3.4.1
- incorporate suggestions from Felix Schwarz:
  - new summary and description
  - new upstream URL (old one out of date)
  - don't package test files
  - include more documentation

* Mon Mar 31 2008 Paul Howarth <paul@...> 3.3.0-1
- update to 3.3.0
- update source URL to include versioned directory and new tarball name
- drop the gcc 4.x compatibility patch, no longer needed
- don't run the test suite as it now depends on zope.testing
- exclude _zope_interface_coptimizations.c source from the binary package

* Thu Feb 14 2008 Paul Howarth <paul@...> 3.0.1-10
- rebuild with gcc 4.3.0 for Fedora 9

* Fri Jan  4 2008 Paul Howarth <paul@...> 3.0.1-9
- tweak %%files list to pull in egg info file when necessary
- fix permissions on shared objects (silence rpmlint)

* Wed Aug 29 2007 Paul Howarth <paul@...> 3.0.1-8
- update license tag to ZPLv2.1 in anticipation of this tag being approved

* Sat Dec  9 2006 Paul Howarth <paul@...> 3.0.1-7
- rebuild against python 2.5 for Rawhide

* Tue Oct 31 2006 Paul Howarth <paul@...> 3.0.1-6
- add %%check section

* Wed Sep 20 2006 Paul Howarth <paul@...> 3.0.1-5
- dispense with %%{pybasever} macro and python-abi dependency, not needed from
  FC4 onwards
- include ZPL 2.1 license text
- add reference in %%description to origin of patch
- change License: tag from "ZPL 2.1" to "Zope Public License" to shut rpmlint up

* Thu Aug 31 2006 Paul Howarth <paul@...> 3.0.1-4
- files list simplified as .pyo files are no longer %%ghost-ed

* Tue May  9 2006 Paul Howarth <paul@...> 3.0.1-3
- import from PyVault Repository
- rewrite in Fedora Extras style

* Tue Aug 23 2005 Jeff Pitman <symbiont+pyvault@...> 3.0.1-2
- add bug fix for gcc 4

* Mon Feb 07 2005 Jeff Pitman <symbiont+pyvault@...> 3.0.1-1
- new rpm

#!/usr/bin/env python
# -*- Mode: Python -*-
# vi:si:et:sw=4:sts=4:ts=4

# this program regenerates the dropin.cache file for twisted,
# or for the modules specified on the command line

# we copy and adapt getPlugins from there because getPlugins does log.err()
# on *any* exception, giving us a full traceback every time a plug-in has
# gone away

import sys
from twisted.plugin import IPlugin, getCache
import twisted.plugins

def getPlugins(interface, package=twisted.plugins):
    allDropins = getCache(package)
    for dropin in allDropins.itervalues():
        for plugin in dropin.plugins:
            try:
                adapted = interface(plugin, None)
            except AttributeError:
                # this is most likely due to a module in the cache that
                # has now gone away, so ignore it
                pass
            except:
                log.err()
            else:
                if adapted is not None:
                    yield adapted

which = None
if len(sys.argv) > 1:
    which = sys.argv[1:]

if not which:
    list(getPlugins(IPlugin))
else:
    from twisted.python import reflect
    for w in which:
        try:
            module = reflect.namedAny(w)
        except AttributeError:
            sys.stderr.write("No module '%s' found.\n" % w)
            continue
        list(getPlugins(IPlugin, module))
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import
get_python_lib; print get_python_lib()")}

Name:           python-fpconst
Version:        0.7.3
Release:        4.oc%{?dist}
Summary:        Python module for handling IEEE 754 floating point special values

Group:          Development/Languages
License:        ASL 2.0
URL:            http://research.warnes.net/statcomp/projects/RStatServer/fpconst
Source0:        http://downloads.sourceforge.net/rsoap/fpconst-%{version}.tar.gz

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch:      noarch
BuildRequires:  python-devel

%description
This python module implements constants and functions for working with
IEEE754 double-precision special values.  It provides constants for
Not-a-Number (NaN), Positive Infinity (PosInf), and Negative Infinity
(NegInf), as well as functions to test for these values.

%prep
%setup -qn fpconst-%{version}
chmod -x README pep-0754.txt

%build
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build

%install
rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%doc CHANGELOG COPYING README pep-0754.txt
%{python_sitelib}/*

%changelog
* Tue May 20 2008 Gareth Armstrong <gareth.armstrong@...> - 0.7.3-4.oc
- First import of python-fpconst from Fedora Rawhide into OpenCall internals repo
- Simplify file delivery to get around egg-info problems on Fedora < 9

* Sat Mar 08 2008 Christopher Stone <chris.stone@...> 0.7.3-3
- Add egg-info to %%files

* Sat Mar 08 2008 Christopher Stone <chris.stone@...> 0.7.3-2
- Fix %%Source0 URL

* Sun Sep 30 2007 Christopher Stone <chris.stone@...> 0.7.3-1
- Upstream sync
- Update source URL
- Some spec file cleanups

* Fri Dec 08 2006 Christopher Stone <chris.stone@...> 0.7.2-3.2
- Add python-devel to BR

* Fri Dec 08 2006 Christopher Stone <chris.stone@...> 0.7.2-3.1
- python(abi) = 0:2.5

* Wed Sep 06 2006 Christopher Stone <chris.stone@...> 0.7.2-3
- No longer %%ghost pyo files.  Bug #205414

* Wed Aug 30 2006 Christopher Stone <chris.stone@...> 0.7.2-2
- Shorten summary
- Remove unnecessary requires

* Sat Mar 18 2006 Christopher Stone <chris.stone@...> 0.7.2-1
- Initial Release of python-fpconst, changes from fpconst include:
- Renamed package from fpconst to python-fpconst
- Removed macros in URL
- Removed python-devel from BR
- Droped the second paragraph in %%description
- Droped PKG-INFO from %%doc
- Added pep-0754.txt to %%doc
------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Buildbot-devel mailing list
Buildbot-devel@...
https://lists.sourceforge.net/lists/listinfo/buildbot-devel

Gmane