Skip to content

Commit

Permalink
Merge pull request #249921 from doronbehar/pkg/scipy
Browse files Browse the repository at this point in the history
python3.pkgs.scipy: 1.11.1 -> 1.11.2
  • Loading branch information
tjni authored Aug 19, 2023
2 parents 647e67b + 4c7e3da commit 5238581
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
12 changes: 4 additions & 8 deletions pkgs/development/python-modules/scipy/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,9 @@ let
#
# nix-shell maintainers/scripts/update.nix --argstr package python3.pkgs.scipy
#
# Even if you do update these hashes manually, don't change their base
# (base16 or base64), because the update script uses sed regexes to replace
# them with the updated hashes.
version = "1.11.1";
srcHash = "sha256-bgnYXe3EhzL7+Gfriz1cXCl2eYQJ8zF+rcIwHyZR8bQ=";
# The update script uses sed regexes to replace them with the updated hashes.
version = "1.11.2";
srcHash = "sha256-7FE740/yKUXtujVX60fQB/xvCZFfV69FRihvSi6+UWo=";
datasetsHashes = {
ascent = "1qjp35ncrniq9rhzb14icwwykqg2208hcssznn3hz27w39615kh3";
ecg = "1bwbjp43b7znnwha5hv6wiz3g0bhwrpqpi75s12zidxrbwvd62pj";
Expand Down Expand Up @@ -80,6 +78,7 @@ in buildPythonPackage {
})
];

# Relax deps a bit
postPatch = ''
substituteInPlace pyproject.toml \
--replace 'numpy==' 'numpy>=' \
Expand Down Expand Up @@ -117,9 +116,6 @@ in buildPythonPackage {
doCheck = !(stdenv.isx86_64 && stdenv.isDarwin);

preConfigure = ''
# Relax deps a bit
substituteInPlace pyproject.toml \
--replace 'numpy==' 'numpy>='
# Helps parallelization a bit
export NPY_NUM_BUILD_JOBS=$NIX_BUILD_CORES
# We download manually the datasets and this variable tells the pooch
Expand Down
8 changes: 5 additions & 3 deletions pkgs/development/python-modules/scipy/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ if grep -q 'version = "'$version $fname; then
echo "Current version $version is the latest available, will update only datasets' hashes (don't take long)"
else
echoerr got version $version
sed -i -E 's/(version = ).*=/\1'$version'/g' $fname
sed -i -E 's/(version = ").*(";)/\1'$version'\2/g' $fname
# Verify the sed command above did not fail
grep -q $version $fname
# Update srcHash
srcHash='"sha256-'$(nix-prefetch-github scipy scipy --rev v${version} --fetch-submodules | jq --raw-output .sha256)'"'
sed -i 's/srcHash = .*=";/srcHash = '$srcHash';/g' $fname
srcHash="$(nix-prefetch-github scipy scipy --rev v${version} --fetch-submodules | jq --raw-output .hash)"
sed -i -E 's#(srcHash = ").*(";)#\1'$srcHash'\2#g' $fname
fi

for d in $datasets; do
Expand Down

0 comments on commit 5238581

Please sign in to comment.