[arch-commits] Commit in python-networkx/repos (2 files)

Felix Yan felixonmars at archlinux.org
Mon Dec 26 03:54:07 UTC 2016


    Date: Monday, December 26, 2016 @ 03:54:07
  Author: felixonmars
Revision: 202489

archrelease: copy trunk to community-staging-any

Added:
  python-networkx/repos/community-staging-any/
  python-networkx/repos/community-staging-any/PKGBUILD
    (from rev 202488, python-networkx/trunk/PKGBUILD)

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

Copied: python-networkx/repos/community-staging-any/PKGBUILD (from rev 202488, python-networkx/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD	                        (rev 0)
+++ community-staging-any/PKGBUILD	2016-12-26 03:54:07 UTC (rev 202489)
@@ -0,0 +1,65 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Clément DEMOULINS <clement at archivel.fr>
+
+pkgbase=python-networkx
+pkgname=(python-networkx python2-networkx)
+_pypiname=networkx
+pkgver=1.11
+pkgrel=2
+pkgdesc='Python package for the creation, manipulation, and study of the structure, dynamics, and functions of complex networks.'
+arch=('any')
+license=('BSD')
+url="http://networkx.github.io"
+makedepends=('python-setuptools' 'python2-setuptools' 'python-decorator' 'python2-decorator')
+checkdepends=('python-nose' 'python2-nose')
+source=("https://github.com/networkx/networkx/archive/${_pypiname}-${pkgver}.tar.gz")
+sha512sums=('97599a6639530cf609c6ba0fb477dd3bc1897ee26bdbb4d0038e525578bd0d2e308965ec2b58aeb243915db25c9e0579e7173678c1b1ceb508929006696eaaa0')
+
+prepare() {
+  cp -a ${_pypiname}-${_pypiname}-$pkgver{,-py2}
+}
+
+build() {
+  cd "$srcdir/${_pypiname}-${_pypiname}-$pkgver"
+  python3 setup.py build
+
+  cd "$srcdir/${_pypiname}-${_pypiname}-$pkgver-py2"
+  python2 setup.py build
+}
+
+check() {
+  cd "$srcdir/${_pypiname}-${_pypiname}-$pkgver"
+  python3 setup.py nosetests #|| true  # Tests fail randomly
+
+  cd "$srcdir/${_pypiname}-${_pypiname}-$pkgver-py2"
+  python2 setup.py nosetests
+}
+
+package_python-networkx() {
+  depends=('python-decorator')
+  optdepends=('python-numpy: Provides sparse matrix representation of graphs and many numerical scientific tools.'
+              'python-scipy: Provides flexible drawing of graphs.'
+              'python-pyparsing: Required for pydot, GML file reading.'
+              'python-yaml: Required for YAML format reading and writing.')
+
+  cd "$srcdir/${_pypiname}-${_pypiname}-$pkgver"
+  python3 setup.py install --root="$pkgdir" --optimize=1
+  install -D -m 644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE.txt"
+  mv "$pkgdir/usr/share/doc/${_pypiname}-$pkgver" "$pkgdir/usr/share/doc/$pkgname"
+}
+
+package_python2-networkx() {
+  depends=('python2-decorator')
+  optdepends=('python2-numpy: Provides sparse matrix representation of graphs and many numerical scientific tools.'
+              'python2-scipy: Provides flexible drawing of graphs.'
+              'python2-pygraphviz: Provides graph drawing and graph layout algorithms.'
+              'python2-pydot: Provides graph drawing and graph layout algorithms.'
+              'python2-pyparsing: Required for pydot, GML file reading.'
+              'python2-yaml: Required for YAML format reading and writing.')
+
+  cd "$srcdir/${_pypiname}-${_pypiname}-$pkgver-py2"
+  python2 setup.py install --root="$pkgdir" --optimize=1
+  install -D -m 644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE.txt"
+  mv "$pkgdir/usr/share/doc/${_pypiname}-$pkgver" "$pkgdir/usr/share/doc/$pkgname"
+}



More information about the arch-commits mailing list