[arch-commits] Commit in python-networkx/repos (2 files)
Felix Yan
felixonmars at archlinux.org
Mon Jan 22 08:18:34 UTC 2018
Date: Monday, January 22, 2018 @ 08:18:34
Author: felixonmars
Revision: 284883
archrelease: copy trunk to community-testing-any
Added:
python-networkx/repos/community-testing-any/
python-networkx/repos/community-testing-any/PKGBUILD
(from rev 284882, python-networkx/trunk/PKGBUILD)
----------+
PKGBUILD | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 65 insertions(+)
Copied: python-networkx/repos/community-testing-any/PKGBUILD (from rev 284882, python-networkx/trunk/PKGBUILD)
===================================================================
--- community-testing-any/PKGBUILD (rev 0)
+++ community-testing-any/PKGBUILD 2018-01-22 08:18:34 UTC (rev 284883)
@@ -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=2.1
+pkgrel=1
+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=('1db1d4e6e6add25509b79b24bcdc30e934b3be714898dcad8092db56908fe40eec47952336b9cbb3662cf5026c821c50db7a2d8578a4dda93585ee0aaf8210ec')
+
+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