From 3569a1158f38ac75f1ee2465b108bc577dca314b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Thu, 28 Mar 2024 15:28:08 -0700 Subject: [PATCH 1/2] python311Packages.pybind11: 2.11.1 -> 2.12.0 Diff: https://github.com/pybind/pybind11/compare/v2.11.1...v2.12.0 Changelog: https://github.com/pybind/pybind11/blob/v2.12.0/docs/changelog.rst --- .../python-modules/pybind11/default.nix | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/pybind11/default.nix b/pkgs/development/python-modules/pybind11/default.nix index cfb7d42a6f46..1a06de633b68 100644 --- a/pkgs/development/python-modules/pybind11/default.nix +++ b/pkgs/development/python-modules/pybind11/default.nix @@ -4,6 +4,8 @@ , pythonOlder , fetchFromGitHub , cmake +, ninja +, setuptools , boost , eigen , python @@ -37,23 +39,29 @@ else python.stdenv; in buildPythonPackage rec { pname = "pybind11"; - version = "2.11.1"; - format = "setuptools"; + version = "2.12.0"; + pyproject = true; src = fetchFromGitHub { owner = "pybind"; - repo = pname; + repo = "pybind11"; rev = "v${version}"; - hash = "sha256-sO/Fa+QrAKyq2EYyYMcjPrYI+bdJIrDoj6L3JHoDo3E="; + hash = "sha256-DVkI5NxM5uME9m3PFYVpJOOa2j+yjL6AJn76fCTv2nE="; }; postPatch = '' - sed -i "/^timeout/d" pyproject.toml + substituteInPlace pyproject.toml \ + --replace-fail "timeout=300" "" ''; - nativeBuildInputs = [ cmake ]; + build-system = [ + cmake + ninja + setuptools + ]; + buildInputs = lib.optionals (pythonOlder "3.9") [ libxcrypt ]; - propagatedBuildInputs = [ setupHook ]; + propagatedNativeBuildInputs = [ setupHook ]; stdenv = stdenv'; From 11d0dfa2743c58f17b885f59425bc0130f2799f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Thu, 28 Mar 2024 15:42:35 -0700 Subject: [PATCH 2/2] python311Packages.scipy: 1.12.0 -> 1.13.0 Changelog: https://docs.scipy.org/doc/scipy/release/1.13.0-notes.html In particular, see upstream commit for cython_3 transition: https://github.com/scipy/scipy/commit/09401057668f2fae6916373b9751ea131f86916d --- .../python-modules/scipy/default.nix | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/scipy/default.nix b/pkgs/development/python-modules/scipy/default.nix index 2587ada7e570..b4be27dcd531 100644 --- a/pkgs/development/python-modules/scipy/default.nix +++ b/pkgs/development/python-modules/scipy/default.nix @@ -34,8 +34,8 @@ let # nix-shell maintainers/scripts/update.nix --argstr package python3.pkgs.scipy # # The update script uses sed regexes to replace them with the updated hashes. - version = "1.12.0"; - srcHash = "sha256-PuiyYTgSegDTV9Kae5N68FOXT1jyJrNv9p2aFP70Z20="; + version = "1.13.0"; + srcHash = "sha256-HaYk92hOREHMOXppK+Bs9DrBu9KUVUsZ0KV+isTofUo="; datasetsHashes = { ascent = "1qjp35ncrniq9rhzb14icwwykqg2208hcssznn3hz27w39615kh3"; ecg = "1bwbjp43b7znnwha5hv6wiz3g0bhwrpqpi75s12zidxrbwvd62pj"; @@ -76,18 +76,15 @@ in buildPythonPackage { "doc/source/dev/contributor/meson_advanced.rst" ]; }) - (fetchpatch { - name = "openblas-0.3.26-compat.patch"; - url = "https://github.com/scipy/scipy/commit/8c96a1f742335bca283aae418763aaba62c03378.patch"; - hash = "sha256-SGoYDxwSAkr6D5/XEqHLerF4e4nmmI+PX+z+3taWAps="; - }) ]; - # Upstream complicated numpy version pinning is causing issues in the - # configurePhase, so we pass on it. + # Upstream says in a comment in their pyproject.toml that building against + # both numpy 2 and numpy 1 should work, but they seem to worry about numpy + # incompatibilities that we here with Nixpkgs' Python ecosystem, shouldn't + # experience. postPatch = '' substituteInPlace pyproject.toml \ - --replace-fail 'numpy==' 'numpy>=' \ + --replace-fail 'numpy>=2.0.0rc1,' 'numpy' \ ''; nativeBuildInputs = [