From 4075c526ec619f32a946c2cb93f9e081cdc38014 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Tue, 27 Aug 2024 18:23:51 +0300 Subject: [PATCH 1/3] python312Packages.scipy: don't use with lib in meta --- pkgs/development/python-modules/scipy/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/scipy/default.nix b/pkgs/development/python-modules/scipy/default.nix index c6daa99905d2..aad048e88f52 100644 --- a/pkgs/development/python-modules/scipy/default.nix +++ b/pkgs/development/python-modules/scipy/default.nix @@ -211,12 +211,12 @@ buildPythonPackage { SCIPY_USE_G77_ABI_WRAPPER = 1; - meta = with lib; { + meta = { changelog = "https://github.com/scipy/scipy/releases/tag/v${version}"; description = "SciPy (pronounced 'Sigh Pie') is open-source software for mathematics, science, and engineering"; downloadPage = "https://github.com/scipy/scipy"; homepage = "https://www.scipy.org/"; - license = licenses.bsd3; - maintainers = with maintainers; [ doronbehar ]; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ doronbehar ]; }; } From 5d63abee89ac0afca31bf7e35be438194634ebc9 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Tue, 27 Aug 2024 18:26:03 +0300 Subject: [PATCH 2/3] python312Packages.scipy: use modern deps Python attributes --- pkgs/development/python-modules/scipy/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/scipy/default.nix b/pkgs/development/python-modules/scipy/default.nix index aad048e88f52..028771ca5dbf 100644 --- a/pkgs/development/python-modules/scipy/default.nix +++ b/pkgs/development/python-modules/scipy/default.nix @@ -95,7 +95,7 @@ buildPythonPackage { --replace-fail "pybind11>=2.12.0,<2.13.0" "pybind11>=2.12.0" \ ''; - nativeBuildInputs = [ + build-system = [ cython gfortran meson-python @@ -120,7 +120,7 @@ buildPythonPackage { xsimd ]; - propagatedBuildInputs = [ numpy ]; + dependencies = [ numpy ]; __darwinAllowLocalNetworking = true; From 34123fcafb67ccc676fe5520f2ff1f31c8278ab7 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Tue, 27 Aug 2024 18:30:09 +0300 Subject: [PATCH 3/3] python312Packages.scipy: cleaning + inputs sorting --- .../python-modules/scipy/default.nix | 70 +++++++++++-------- 1 file changed, 39 insertions(+), 31 deletions(-) diff --git a/pkgs/development/python-modules/scipy/default.nix b/pkgs/development/python-modules/scipy/default.nix index 028771ca5dbf..5084f741c838 100644 --- a/pkgs/development/python-modules/scipy/default.nix +++ b/pkgs/development/python-modules/scipy/default.nix @@ -1,34 +1,41 @@ { lib, stdenv, - fetchFromGitHub, - fetchpatch, fetchurl, writeText, - xcbuild, python, buildPythonPackage, + fetchFromGitHub, + fetchpatch, + + # build-system cython, gfortran, meson-python, nukeReferences, - pkg-config, pythran, - wheel, + pkg-config, setuptools, - hypothesis, - pytest7CheckHook, - pytest-xdist, - numpy, - pybind11, - pooch, - xsimd, + xcbuild, + + # buildInputs # Upstream has support for using Darwin's Accelerate package. However this # requires a Darwin user to work on a nice way to do that via an override. # See: # https://github.com/scipy/scipy/blob/v1.14.0/scipy/meson.build#L194-L211 blas, lapack, + pybind11, + pooch, + xsimd, + + # dependencies + numpy, + + # tests + hypothesis, + pytest7CheckHook, + pytest-xdist, # Reverse dependency sage, @@ -66,12 +73,12 @@ let in buildPythonPackage { inherit pname version; - format = "pyproject"; + pyproject = true; src = fetchFromGitHub { owner = "scipy"; - repo = pname; - rev = "v${version}"; + repo = "scipy"; + rev = "refs/tags/v${version}"; hash = srcHash; fetchSubmodules = true; }; @@ -95,22 +102,23 @@ buildPythonPackage { --replace-fail "pybind11>=2.12.0,<2.13.0" "pybind11>=2.12.0" \ ''; - build-system = [ - cython - gfortran - meson-python - nukeReferences - pythran - pkg-config - wheel - setuptools - ] ++ lib.optionals stdenv.isDarwin [ - # Minimal version required according to: - # https://github.com/scipy/scipy/blob/v1.14.0/scipy/meson.build#L185-L188 - (xcbuild.override { - sdkVer = "13.3"; - }) - ]; + build-system = + [ + cython + gfortran + meson-python + nukeReferences + pythran + pkg-config + setuptools + ] + ++ lib.optionals stdenv.isDarwin [ + # Minimal version required according to: + # https://github.com/scipy/scipy/blob/v1.14.0/scipy/meson.build#L185-L188 + (xcbuild.override { + sdkVer = "13.3"; + }) + ]; buildInputs = [ blas