mirror of
https://github.com/void-linux/void-packages.git
synced 2025-09-05 19:43:07 +02:00
python3-networkx: update to 3.5.
This commit is contained in:
parent
e0b28f3742
commit
42194f562e
2 changed files with 38 additions and 3 deletions
|
@ -0,0 +1,35 @@
|
||||||
|
Taken from https://github.com/networkx/networkx/pull/8096
|
||||||
|
|
||||||
|
From 05c7b527998dcc9077f704848e48538020e36098 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ross Barnowski <rossbar@caltech.edu>
|
||||||
|
Date: Tue, 3 Jun 2025 13:05:37 -0700
|
||||||
|
Subject: [PATCH] Fix gh-8091
|
||||||
|
|
||||||
|
---
|
||||||
|
networkx/generators/lattice.py | 8 ++++----
|
||||||
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/networkx/generators/lattice.py b/networkx/generators/lattice.py
|
||||||
|
index 95e520d2ce1..0617cd2bf7a 100644
|
||||||
|
--- a/networkx/generators/lattice.py
|
||||||
|
+++ b/networkx/generators/lattice.py
|
||||||
|
@@ -124,15 +124,15 @@ def grid_graph(dim, periodic=False):
|
||||||
|
>>> len(G)
|
||||||
|
6
|
||||||
|
"""
|
||||||
|
+ from collections.abc import Iterable
|
||||||
|
+
|
||||||
|
from networkx.algorithms.operators.product import cartesian_product
|
||||||
|
|
||||||
|
if not dim:
|
||||||
|
return empty_graph(0)
|
||||||
|
|
||||||
|
- try:
|
||||||
|
- func = (cycle_graph if p else path_graph for p in periodic)
|
||||||
|
- except TypeError:
|
||||||
|
- func = repeat(cycle_graph if periodic else path_graph)
|
||||||
|
+ periodic = repeat(periodic) if not isinstance(periodic, Iterable) else periodic
|
||||||
|
+ func = (cycle_graph if p else path_graph for p in periodic)
|
||||||
|
|
||||||
|
G = next(func)(dim[0])
|
||||||
|
for current_dim in dim[1:]:
|
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'python3-networkx'
|
# Template file for 'python3-networkx'
|
||||||
pkgname=python3-networkx
|
pkgname=python3-networkx
|
||||||
version=3.4.2
|
version=3.5
|
||||||
revision=2
|
revision=1
|
||||||
build_style=python3-pep517
|
build_style=python3-pep517
|
||||||
hostmakedepends="python3-setuptools python3-wheel"
|
hostmakedepends="python3-setuptools python3-wheel"
|
||||||
depends="python3"
|
depends="python3"
|
||||||
|
@ -13,7 +13,7 @@ license="BSD-3-Clause"
|
||||||
homepage="https://networkx.org"
|
homepage="https://networkx.org"
|
||||||
changelog="https://github.com/networkx/networkx/raw/main/doc/release/release_${version}.rst"
|
changelog="https://github.com/networkx/networkx/raw/main/doc/release/release_${version}.rst"
|
||||||
distfiles="${PYPI_SITE}/n/networkx/networkx-${version}.tar.gz"
|
distfiles="${PYPI_SITE}/n/networkx/networkx-${version}.tar.gz"
|
||||||
checksum=307c3669428c5362aab27c8a1260aa8f47c4e91d3891f48be0141738d8d053e1
|
checksum=d4c6f9cf81f52d69230866796b82afbccdec3db7ae4fbd1b65ea750feed50037
|
||||||
|
|
||||||
post_install() {
|
post_install() {
|
||||||
vlicense LICENSE.txt
|
vlicense LICENSE.txt
|
||||||
|
|
Loading…
Add table
Reference in a new issue