[arch-commits] Commit in pygraphviz/repos (community-x86_64 community-x86_64/PKGBUILD)

Alad Wenter alad at archlinux.org
Tue Jan 8 09:17:18 UTC 2019


    Date: Tuesday, January 8, 2019 @ 09:17:18
  Author: alad
Revision: 421013

archrelease: copy trunk to community-x86_64

Added:
  pygraphviz/repos/community-x86_64/
  pygraphviz/repos/community-x86_64/PKGBUILD
    (from rev 421012, pygraphviz/trunk/PKGBUILD)

----------+
 PKGBUILD |   51 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)

Copied: pygraphviz/repos/community-x86_64/PKGBUILD (from rev 421012, pygraphviz/trunk/PKGBUILD)
===================================================================
--- community-x86_64/PKGBUILD	                        (rev 0)
+++ community-x86_64/PKGBUILD	2019-01-08 09:17:18 UTC (rev 421013)
@@ -0,0 +1,51 @@
+# Maintainer: Alad Wenter <alad at mailbox.org>
+# Contributor: Clément DEMOULINS <clement at archivel.fr>
+pkgbase=pygraphviz
+pkgname=('python-pygraphviz' 'python2-pygraphviz')
+pkgver=1.5
+pkgrel=1
+pkgdesc='Python interface to the Graphviz graph layout and visualization package'
+makedepends=('python' 'python2' 'graphviz' 'python-setuptools' 'python2-setuptools')
+arch=('x86_64')
+license=('LGPL')
+url='https://pygraphviz.github.io/'
+source=("https://github.com/$pkgbase/$pkgbase/archive/$pkgbase-$pkgver.tar.gz")
+sha256sums=('58c3122c7efb9a62275a915953818acd5b3e113b943075501d316ab2291dc21d')
+
+prepare() {
+    cp -a "$pkgbase-$pkgbase-$pkgver" "python2-$pkgbase-$pkgver"
+}
+
+build() {
+    cd "$pkgbase-$pkgbase-$pkgver"
+    python setup.py build
+
+    cd ../"python2-$pkgbase-$pkgver"
+    python2 setup.py build
+}
+
+package_python-pygraphviz() {
+    depends=('python3' 'graphviz')
+
+    cd "$pkgbase-$pkgbase-$pkgver"
+    python setup.py install --prefix=/usr --root="$pkgdir" --optimize=1 \
+        --include-path /usr/include/graphviz \
+        --library-path /usr/lib/graphviz
+    mv "$pkgdir/usr/share/doc/$pkgbase-$pkgver" "$pkgdir/usr/share/doc/python-pygraphviz"
+}
+
+package_python2-pygraphviz() {
+    depends=('python2' 'graphviz')
+
+    cd "python2-$pkgbase-$pkgver"
+    python2 setup.py install --prefix=/usr --root="$pkgdir" --optimize=1 \
+        --include-path /usr/include/graphviz \
+        --library-path /usr/lib/graphviz
+    mv "$pkgdir/usr/share/doc/$pkgbase-$pkgver" "$pkgdir/usr/share/doc/python2-pygraphviz"
+
+    # Patch to use python2
+    find "$pkgdir" -type f \( -name '*.py' -or -executable \) -exec \
+        sed -i -e 's|#![ ]*/usr/bin/python$|#!/usr/bin/python2|' \
+        -e 's|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|' \
+    {} \;
+}


More information about the arch-commits mailing list