Merge pull request #167679 from collares/sage-networkx27

sage: post python-unstable/staging-next merge fixes
This commit is contained in:
Artturi 2022-04-07 23:29:10 +03:00 committed by GitHub
commit f087013f8e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 30 additions and 7 deletions

View file

@ -151,6 +151,7 @@ writeTextFile rec {
# needed for cython
export CC='${stdenv.cc}/bin/${stdenv.cc.targetPrefix}cc'
export CXX='${stdenv.cc}/bin/${stdenv.cc.targetPrefix}c++'
# cython needs to find these libraries, otherwise will fail with `ld: cannot find -lflint` or similar
export LDFLAGS='${
lib.concatStringsSep " " (map (pkg: "-L${pkg}/lib") [
@ -178,6 +179,7 @@ writeTextFile rec {
mpfr.dev
])
}'
export CXXFLAGS=$CFLAGS
export SAGE_LIB='${sagelib}/${python3.sitePackages}'

View file

@ -121,10 +121,10 @@ stdenv.mkDerivation rec {
# https://trac.sagemath.org/ticket/33170
(fetchSageDiff {
base = "9.5.rc1";
name = "ipython-8-update.patch";
rev = "a90a314616d86d6be9c0d5233f0d36c4bfe06231";
sha256 = "sha256-pXdtokTo84xNCnV+HyAKEzG562z8FjzJ7hczOja0dRw=";
base = "9.6.beta5";
name = "ipython-8.1-update.patch";
rev = "4d2b53f1541375861310af3a7f7109c1c2ed475d";
sha256 = "sha256-ELda/VBzsQH7NdFas69fQ35QPUoJCeLx/gxT1j7qGR8=";
})
# https://trac.sagemath.org/ticket/32968
@ -156,6 +156,22 @@ stdenv.mkDerivation rec {
# adapted from https://trac.sagemath.org/ticket/23712#comment:22
./patches/tachyon-renamed-focallength.patch
# https://trac.sagemath.org/ticket/33336
(fetchSageDiff {
base = "9.6.beta2";
name = "scipy-1.8-update.patch";
rev = "9c8235e44ffb509efa8a3ca6cdb55154e2b5066d";
sha256 = "sha256-bfc4ljNOxVnhlmxIuNbjbKl4vJXYq2tlF3Z8bbC8PWw=";
})
# 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;

View file

@ -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)"