From 34123fcafb67ccc676fe5520f2ff1f31c8278ab7 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Tue, 27 Aug 2024 18:30:09 +0300 Subject: [PATCH] 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