Date: Saturday, March 19, 2011 @ 00:56:59 Author: allan Revision: 115670
upgpkg: python2-feedparser 5.0.1-1 upstream update, provide python 2 and 3 versions Modified: python-feedparser/trunk/PKGBUILD Deleted: python-feedparser/trunk/feedparser_utf8_decoding.patch --------------------------------+ PKGBUILD | 41 ++++++++++++++++++++++++--------------- feedparser_utf8_decoding.patch | 11 ---------- 2 files changed, 26 insertions(+), 26 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2011-03-19 03:06:54 UTC (rev 115669) +++ PKGBUILD 2011-03-19 04:56:59 UTC (rev 115670) @@ -2,27 +2,38 @@ # Maintainer: Allan McRae <[email protected]> # Contributor: Simo Leone <[email protected]> -pkgname=python-feedparser -pkgver=4.1 -pkgrel=6 +# Note: python2 version must be built first as packaging python3 version "destroys" the source +pkgname=('python2-feedparser' 'python-feedparser') +pkgver=5.0.1 +pkgrel=1 pkgdesc="Parse RSS and Atom feeds in Python" arch=('any') url="http://feedparser.sf.net" license=('custom') -depends=('python2' 'libxml2' ) -source=(http://downloads.sourceforge.net/feedparser/feedparser-${pkgver}.zip - feedparser_utf8_decoding.patch) -md5sums=('7ab1140c1e29d4cd52ab20fa7b1f8640' - '1412caa1577260945df5ef0f5efabc62') +makedepends=('python' 'python2' 'libxml2' ) +source=(http://feedparser.googlecode.com/files/feedparser-${pkgver}.tar.bz2) +md5sums=('702835de74bd4a578524f311e62c2877') -build() { - cd ${srcdir} - patch -Np0 -i feedparser_utf8_decoding.patch - sed -i "s#env python#env python2#" feedparser.py -} -package() { - cd ${srcdir} +package_python2-feedparser() { + depends=('python' 'libxml2' ) + pkgdesc="Parse RSS and Atom feeds in Python2" + + cd ${srcdir}/feedparser-$pkgver python2 setup.py install --root=${pkgdir} + + sed -i 's#env python$#env python2#' \ + $pkgdir/usr/lib/python2.7/site-packages/feedparser.py + install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/license } + +package_python-feedparser() { + depends=('python' 'libxml2' ) + + cd ${srcdir}/feedparser-$pkgver + . convert_to_py3.sh + PYTHONPATH=feedparser python setup.py install --root=${pkgdir} + + install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/license +} Deleted: feedparser_utf8_decoding.patch =================================================================== --- feedparser_utf8_decoding.patch 2011-03-19 03:06:54 UTC (rev 115669) +++ feedparser_utf8_decoding.patch 2011-03-19 04:56:59 UTC (rev 115670) @@ -1,11 +0,0 @@ ---- /var/lib/python-support/python2.5/feedparser.py 2008-01-23 20:10:27.000000000 +0100 -+++ feedparser.py 2008-07-28 11:01:38.000000000 +0200 -@@ -1455,7 +1455,7 @@ - # thanks to Kevin Marks for this breathtaking hack to deal with (valid) high-bit attribute values in UTF-8 feeds - for key, value in attrs: - if type(value) != type(u''): -- value = unicode(value, self.encoding) -+ value = unicode(value, self.encoding, errors='replace') - uattrs.append((unicode(key, self.encoding), value)) - strattrs = u''.join([u' %s="%s"' % (key, value) for key, value in uattrs]).encode(self.encoding) - if tag in self.elements_no_end_tag:
