Commit 26e76340 authored by Bart Ribbers's avatar Bart Ribbers
Browse files

community/py3-networkx: upgrade to 2.5.1

parent e73b6497
Fixes a test failure on 32-bit arches
From e41a1fddec672f7627415bf38f420b78565cee2a Mon Sep 17 00:00:00 2001
From: Ross Barnowski <rossbar@berkeley.edu>
Date: Sun, 30 Aug 2020 15:39:19 -0700
......
From b36e2991c2d4387192dc1c1f285bf888646db0fa Mon Sep 17 00:00:00 2001
From: Ross Barnowski <rossbar@berkeley.edu>
Date: Tue, 6 Oct 2020 21:02:42 -0500
Subject: [PATCH] TST: Modify heuristic for astar path test. (#4237)
Replace hash() with a sum-of-squares heuristic in
test_weight_functions so that the heuristic is not
platform-dependent.
---
networkx/algorithms/shortest_paths/tests/test_weighted.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/networkx/algorithms/shortest_paths/tests/test_weighted.py b/networkx/algorithms/shortest_paths/tests/test_weighted.py
index b234618c4c..a4ba92c023 100644
--- a/networkx/algorithms/shortest_paths/tests/test_weighted.py
+++ b/networkx/algorithms/shortest_paths/tests/test_weighted.py
@@ -198,7 +198,7 @@ def test_bidirectional_dijkstra(self):
def test_weight_functions(self):
def heuristic(*z):
- return hash(z)
+ return sum(val ** 2 for val in z)
def getpath(pred, v, s):
return [v] if v == s else getpath(pred, pred[v], s) + [v]
# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=py3-networkx
pkgver=2.5
pkgrel=1
pkgver=2.5.1
pkgrel=0
pkgdesc="Software for complex networks"
url="https://networkx.github.io/"
arch="noarch !mips64"
license="BSD-3-Clause"
depends="python3 py3-decorator"
depends="
py3-decorator
python3
"
makedepends="py3-setuptools"
subpackages="$pkgname-doc"
checkdepends="py3-pytest py3-pygraphviz py3-pydot py3-numpy py3-scipy py3-yaml
py3-pandas py3-matplotlib py3-lxml cmd:xdg-open"
checkdepends="
cmd:xdg-open
py3-lxml
py3-matplotlib
py3-numpy
py3-pandas
py3-pydot
py3-pygraphviz
py3-pytest
py3-scipy
py3-yaml
"
source="https://pypi.python.org/packages/source/n/networkx/networkx-$pkgver.tar.gz
4185.patch
https://github.com/networkx/networkx/commit/b36e2991c2d4387192dc1c1f285bf888646db0fa.patch
pyyaml-5.4.patch
0001-add-dtype-to-pandas-test.patch
0002-pyyaml-5.4.patch
0003-modify-heuristic-for-astar-path-test.patch
"
builddir="$srcdir/networkx-$pkgver"
......@@ -31,7 +44,9 @@ package() {
python3 setup.py install --prefix=/usr --root="$pkgdir"
}
sha512sums="ab51198072d20bdba7c9ceb6856631a20a7e9527a7cadb41271a999f57bf60da5488269c6e4e1f3f4f33420ec6493af665386842c216ea1cfadd1792ccb6444e networkx-2.5.tar.gz
cfd479cba5a253044e40bc24fc482c3a59a4a4e4cc551a3789216f636caa973164ea203d8d038ee9527a5275b17d4c141214239283defa30b533a43cab32a8c7 4185.patch
f67763b4d548ef3413f75f354b24fe30a6731e84ef8cdca4b01394aecb80d9a3f4b5cbc6271084e285c343d3f2a0a16fa30dc0c0747451618e1bf79ec755cce6 b36e2991c2d4387192dc1c1f285bf888646db0fa.patch
357c06ed690a40f372a245c050de9bfd468366921f850972966e1ed273f7baa49f7e32f1ae476a14ab2ead6beef44ebc58d61e4ddf785ab638e8cd88efca88e3 pyyaml-5.4.patch"
sha512sums="
995e6637a11a6ca6acb1d3745b36a38045e4c11776731ebc3a847170df423074534313a2bdfe0aa07dd85b7aacc78c56d882cef8e5ac9cf641c63b33d964794b networkx-2.5.1.tar.gz
aa791d7023fcd13545589b5e13c8525a062c2a13f4174d85be273b3ce004c88bd907e0f78bd408744d9016d5607568dd0b000cda1f16b3d351b5793678bb310d 0001-add-dtype-to-pandas-test.patch
357c06ed690a40f372a245c050de9bfd468366921f850972966e1ed273f7baa49f7e32f1ae476a14ab2ead6beef44ebc58d61e4ddf785ab638e8cd88efca88e3 0002-pyyaml-5.4.patch
f67763b4d548ef3413f75f354b24fe30a6731e84ef8cdca4b01394aecb80d9a3f4b5cbc6271084e285c343d3f2a0a16fa30dc0c0747451618e1bf79ec755cce6 0003-modify-heuristic-for-astar-path-test.patch
"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment