[arch-commits] Commit in python-feedparser/trunk (PKGBUILD)

Eric Bélanger eric at archlinux.org
Thu Oct 4 20:53:21 UTC 2012


    Date: Thursday, October 4, 2012 @ 16:53:21
  Author: eric
Revision: 167993

upgpkg: python-feedparser 5.1.2-2

Rebuild against python 3.3, PKGBUILD reorganization

Modified:
  python-feedparser/trunk/PKGBUILD

----------+
 PKGBUILD |   58 +++++++++++++++++++++++++++++-----------------------------
 1 file changed, 29 insertions(+), 29 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2012-10-04 19:24:43 UTC (rev 167992)
+++ PKGBUILD	2012-10-04 20:53:21 UTC (rev 167993)
@@ -1,12 +1,10 @@
 # $Id$
-# Maintainer: Allan McRae <allan at archlinux.org>
-# Contributor: Simo Leone <neotuli at gmail.com>
+# Maintainer: Eric Bélanger <eric at archlinux.org>
 
-# Note: python2 version must be built first as packaging python3 version "destroys" the source
+pkgbase=python-feedparser
 pkgname=('python2-feedparser' 'python-feedparser' 'python-sgmllib')
-pkgbase=python-feedparser
 pkgver=5.1.2
-pkgrel=1
+pkgrel=2
 pkgdesc="Parse RSS and Atom feeds in Python"
 arch=('any')
 url="http://code.google.com/p/feedparser/"
@@ -16,36 +14,39 @@
 md5sums=('9f88692c7c1af1d47839eb2025984975')
 
 build() {
-  cd ${srcdir}/feedparser-$pkgver
-  
-  # files get installed with (incorrect) permissions in the tarball...
-  chmod 644 feedparser/feedparser.egg-info/*
+  cd "${srcdir}"
+  chmod 644  feedparser-${pkgver}/feedparser/feedparser.egg-info/*
+  cp -r feedparser-${pkgver} feedparser-${pkgver}-python2
+  cp -r feedparser-${pkgver} feedparser-${pkgver}-python
+  cp -r feedparser-${pkgver} feedparser-${pkgver}-sgmllib
+
+  cd feedparser-${pkgver}-python2
+  sed -i 's#env python$#env python2#' feedparser/feedparser.py
+  cd ..
+
+  cd feedparser-${pkgver}-python
+  2to3 -w feedparser/feedparser.py feedparser/feedparsertest.py
+  cd ..
+
+  cd feedparser-${pkgver}-sgmllib
+  python /usr/lib/python3.3/compileall.py feedparser/sgmllib3.py
 }
 
 package_python2-feedparser() {
   depends=('python2' '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
+  cd "${srcdir}/feedparser-${pkgver}-python2"
+  python2 setup.py install --root="${pkgdir}"
+  install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/license"
 }
 
 package_python-feedparser() {
   depends=('libxml2' 'python-sgmllib')
   
-  cd ${srcdir}/feedparser-$pkgver
-  
-  # this _should_ happen automatically...
-  2to3 -w feedparser/feedparser.py feedparser/feedparsertest.py
-  
-  PYTHONPATH=feedparser python setup.py install --root=${pkgdir}  
-  
-  install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/license
+  cd "${srcdir}/feedparser-${pkgver}-python"
+  python setup.py install --root="${pkgdir}"
+  install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/license"
 }
 
 package_python-sgmllib() {
@@ -53,10 +54,9 @@
   pkgdesc="Port of sgmllib to python-3"
   license=('PSF')
   
-  cd ${srcdir}/feedparser-$pkgver
+  cd "${srcdir}/feedparser-${pkgver}-sgmllib"
   install -Dm644 feedparser/sgmllib3.py \
-    ${pkgdir}/usr/lib/python3.2/site-packages/sgmllib.py
-  
-  python /usr/lib/python3.2/compileall.py \
-    ${pkgdir}/usr/lib/python3.2/site-packages/
+    "${pkgdir}/usr/lib/python3.3/site-packages/sgmllib.py"
+  install -Dm644 feedparser/__pycache__/sgmllib3.cpython-33.pyc \
+    "${pkgdir}/usr/lib/python3.3/site-packages/__pycache__/sgmllib.cpython-33.pyc"
 }




More information about the arch-commits mailing list