From 49cddf1a7836c981cf72ce6b71db9ff9a8f42ae5 Mon Sep 17 00:00:00 2001 From: Mauricio Collares Date: Thu, 7 Apr 2022 12:16:52 +0200 Subject: [PATCH] sage: import networkx 2.7 update patch --- pkgs/applications/science/math/sage/sage-src.nix | 8 ++++++++ pkgs/applications/science/math/sage/sagelib.nix | 11 ++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/science/math/sage/sage-src.nix b/pkgs/applications/science/math/sage/sage-src.nix index 22e3a288b7d7..d6909e6a4c51 100644 --- a/pkgs/applications/science/math/sage/sage-src.nix +++ b/pkgs/applications/science/math/sage/sage-src.nix @@ -156,6 +156,14 @@ stdenv.mkDerivation rec { # adapted from https://trac.sagemath.org/ticket/23712#comment:22 ./patches/tachyon-renamed-focallength.patch + + # https://trac.sagemath.org/ticket/33495 + (fetchSageDiff { + base = "9.6.beta5"; + name = "networkx-2.7-update.patch"; + rev = "8452003846a7303100847d8d0ed642fc642c11d6"; + sha256 = "sha256-A/XMouPlc2sjFp30L+56fBGJXydS2EtzfPOV98FCDqI="; + }) ]; patches = nixPatches ++ bugfixPatches ++ packageUpgradePatches; diff --git a/pkgs/applications/science/math/sage/sagelib.nix b/pkgs/applications/science/math/sage/sagelib.nix index 8d685c8da60f..92eae35688f7 100644 --- a/pkgs/applications/science/math/sage/sagelib.nix +++ b/pkgs/applications/science/math/sage/sagelib.nix @@ -181,11 +181,16 @@ buildPythonPackage rec { # some files, like Pipfile, pyproject.toml, requirements.txt and setup.cfg # are generated by the bootstrap script using m4. these can fetch data from # build/pkgs, either directly or via sage-get-system-packages. - sed -i 's/==2.1.0rc1/>=2.1.1/' ../gmpy2/install-requires.txt - sed -i 's/, <3.4//' ../rpy2/install-requires.txt - sed -i 's/, <4.3//' ../sphinx/install-requires.txt sed -i '/sage_conf/d' src/setup.cfg.m4 sed -i '/sage_conf/d' src/requirements.txt.m4 + + # version lower bounds are useful, but upper bounds are a hassle because + # Sage tests already catch any relevant API breakage. + # according to the discussion at https://trac.sagemath.org/ticket/33520, + # upper bounds will be less noisy starting from Sage 9.6. + sed -i 's/==2.1.0rc1/>=2.1.1/' ../gmpy2/install-requires.txt + sed -i 's/, <[^, ]*//' ../*/install-requires.txt + for infile in src/*.m4; do if [ -f "$infile" ]; then outfile="src/$(basename $infile .m4)"