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

David Runge dvzrv at archlinux.org
Sat Sep 8 12:56:27 UTC 2018


    Date: Saturday, September 8, 2018 @ 12:56:27
  Author: dvzrv
Revision: 378814

upgpkg: python-pyrss2gen 1.1-8

Adding python2 version of package.

Modified:
  python-pyrss2gen/trunk/PKGBUILD

----------+
 PKGBUILD |   31 ++++++++++++++++++++++---------
 1 file changed, 22 insertions(+), 9 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2018-09-08 12:51:58 UTC (rev 378813)
+++ PKGBUILD	2018-09-08 12:56:27 UTC (rev 378814)
@@ -1,15 +1,15 @@
 # Maintainer: David Runge <dave at sleepmap.de>
 _name=PyRSS2Gen
-pkgname=python-pyrss2gen
+pkgbase=python-pyrss2gen
+pkgname=('python-pyrss2gen' 'python2-pyrss2gen')
 pkgver=1.1
-pkgrel=7
+pkgrel=8
 pkgdesc="Generate RSS2 using a Python data structure"
 arch=('any')
 url="http://www.dalkescientific.com/Python/PyRSS2Gen.html"
 license=('BSD')
-depends=('python')
-makedepends=('python-setuptools')
-checkdepends=('python-pytest')
+makedepends=('python-setuptools' 'python2-setuptools')
+checkdepends=('python-pytest' 'python2-pytest')
 # pypi source doesn't contain LICENSE
 #source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz")
 source=("http://www.dalkescientific.com/Python/${_name}-${pkgver}.tar.gz")
@@ -16,16 +16,18 @@
 sha512sums=('2240686914c87984626eb739676927fcd53488158bdebf589e07e8a778e6d24305964e032581c61836f0fabc1264e42d05c88eac8f4c5f6536c31c775434ce02')
 
 prepare() {
-  mv -v "${_name}-$pkgver" "$pkgname-$pkgver"
+  mv -v "${_name}-$pkgver" "$pkgbase-$pkgver"
 }
 
 build() {
-  cd "$pkgname-$pkgver"
+  cd "$pkgbase-$pkgver"
   python setup.py build
+  python2 setup.py build
 }
 
-package() {
-  cd "$pkgname-$pkgver"
+package_python-pyrss2gen() {
+  cd "$pkgbase-$pkgver"
+  depends=('python')
   python setup.py install --skip-build \
     --optimize=1 \
     --prefix=/usr \
@@ -33,3 +35,14 @@
   install -vDm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
   install -vDm 644 README -t "${pkgdir}/usr/share/doc/${pkgname}"
 }
+
+package_python2-pyrss2gen() {
+  cd "$pkgbase-$pkgver"
+  depends=('python2')
+  python2 setup.py install --skip-build \
+    --optimize=1 \
+    --prefix=/usr \
+    --root="${pkgdir}"
+  install -vDm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
+  install -vDm 644 README -t "${pkgdir}/usr/share/doc/${pkgname}"
+}



More information about the arch-commits mailing list