From 4053bb816f3fe7e894954a045440731b022df592 Mon Sep 17 00:00:00 2001 From: Sharlatan Hellseher Date: Sun, 7 Dec 2025 13:23:18 +0000 Subject: [PATCH] gnu: python-numpy-2: Deprecate by python-numpy. * gnu/packages/python-xyz.scm (python-numpy-2): Deprecated in favor of python-numpy. (python-omero-py, python-numexpr) [propagated-inputs]: Remove python-numpy-2; add python-numpy. * gnu/packages/algebra.scm (kissfft) [native-inputs]: Remove python-numpy-2; add python-numpy. * gnu/packages/image.scm (vigra): [inputs]: Remove python-numpy-2; add python-numpy. * gnu/packages/machine-learning.scm (python-spacy): [propagated-inputs]: Remove python-numpy-2; add python-numpy. * gnu/packages/machine-learning.scm (python-thinc): [propagated-inputs]: Remove python-numpy-2; add python-numpy. * gnu/packages/maths.scm (python-blis): [native-inputs]: Remove python-numpy-2; add python-numpy. Change-Id: Ie6041de76a227246ec63b0efa04d293dcc22b40b --- gnu/packages/algebra.scm | 2 +- gnu/packages/image.scm | 2 +- gnu/packages/machine-learning.scm | 4 +- gnu/packages/maths.scm | 2 +- gnu/packages/python-xyz.scm | 86 ++----------------------------- 5 files changed, 8 insertions(+), 88 deletions(-) diff --git a/gnu/packages/algebra.scm b/gnu/packages/algebra.scm index 79ccfd9581b..97c18d4dceb 100644 --- a/gnu/packages/algebra.scm +++ b/gnu/packages/algebra.scm @@ -805,7 +805,7 @@ a C program.") (native-inputs (list googletest pkg-config - python-numpy-2 + python-numpy python-wrapper)) (inputs (list fftw diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm index 3a29490373a..121d706a76c 100644 --- a/gnu/packages/image.scm +++ b/gnu/packages/image.scm @@ -1478,7 +1478,7 @@ from Lisp and S-expressions, building pixel perfect badges.") libtiff openexr-2 python-wrapper - python-numpy-2 + python-numpy zlib)) (native-inputs (list doxygen python-sphinx)) (synopsis "Computer vision library") diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index 07d5f68f822..62cd8a5f06c 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -1600,7 +1600,7 @@ natural language processing framework.") python-jinja2 python-langcodes python-murmurhash - python-numpy-2 + python-numpy python-packaging python-preshed python-pydantic-2 @@ -2277,7 +2277,7 @@ and are compatible with its API.") python-confection python-cymem python-murmurhash - python-numpy-2 + python-numpy python-packaging python-preshed python-pydantic-2 diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index be07299959f..8bbbf89d114 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -4401,7 +4401,7 @@ summation in K-fold precision.") (delete-file-recursively "blis")))))) (native-inputs (list python-cython - python-numpy-2 + python-numpy python-pytest python-setuptools)) (home-page "https://github.com/explosion/cython-blis") diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 1e9a1cff6f4..bb6fe163695 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -6526,7 +6526,7 @@ of @code{xmlfile}.") (propagated-inputs (list python-appdirs python-future - python-numpy-2 + python-numpy python-pillow python-pyyaml python-requests @@ -10971,87 +10971,7 @@ include_dirs = ~:*~a/include~%" gfortran)) (inputs (list bash openblas)))) -(define-public python-numpy-2 - (package - (inherit python-numpy) - (name "python-numpy") - (version "2.3.1") - (source - (origin - (method url-fetch) - (uri (string-append - "https://github.com/numpy/numpy/releases/download/v" - version "/numpy-" version ".tar.gz")) - (sha256 - (base32 "0aqx8hsw54wfp7iv0h0ljlpsygvmrmi3rjic6rsa6v92lhhaxj8y")))) - (arguments - (list - #:modules '((guix build utils) - (guix build pyproject-build-system) - (ice-9 format)) - #:test-flags - #~(list "-m" "not slow" - "--numprocesses" (number->string (min 8 (parallel-job-count))) - ;; See: , - ;; , - ;; . - "-k" "not test_api_importable") - #:phases - #~(modify-phases %standard-phases - (add-after 'unpack 'fix-executable-paths - (lambda _ - (substitute* "numpy/distutils/exec_command.py" - (("'/bin/sh'") - (format #f "~s" (which "bash")))) - (substitute* "numpy/meson.build" - ;; Relay on python from the PATH instead of full reference - ;; stored in built wheel. - (("'py.full_path\\(\\)'") "'python'")))) - (add-before 'build 'parallelize-build - (lambda _ - (setenv "OMP_NUM_THREAD" - (number->string (parallel-job-count))) - (setenv "NPY_NUM_BUILD_JOBS" - (number->string (parallel-job-count))))) - ;; XXX: It fails with an issue "'fenv_t' has not been declared..." - ;; when the gfortran header is used. Remove gfortran from - ;; CPLUS_INCLUDE_PATH as a workaround. Taken from - ;; . - (add-after 'set-paths 'hide-gfortran - (lambda* (#:key inputs #:allow-other-keys) - (let ((gfortran (assoc-ref inputs "gfortran"))) - (setenv "CPLUS_INCLUDE_PATH" - (string-join - (delete (string-append gfortran "/include/c++") - (string-split (getenv "CPLUS_INCLUDE_PATH") #\:)) - ":"))))) - (add-before 'build 'configure-blas - (lambda* (#:key inputs #:allow-other-keys) - (call-with-output-file "site.cfg" - (lambda (port) - (format port - "[openblas] -libraries = openblas -library_dirs = ~a/lib -include_dirs = ~:*~a/include~%" #$(this-package-input "openblas")))))) - (replace 'check - (lambda* (#:key tests? test-flags #:allow-other-keys) - (when tests? - (with-directory-excursion #$output - (apply invoke "pytest" test-flags)))))))) - (native-inputs - (list gfortran - meson-python - ninja - pkg-config - python-hypothesis - python-mypy - python-pytest - python-pytest-xdist - python-setuptools - python-setuptools - python-typing-extensions - python-wheel)))) +(define-deprecated/public-alias python-numpy-2 python-numpy) (define-public python-numpysane (package @@ -11723,7 +11643,7 @@ apply unified diffs. It has features such as: (list python-pytest python-setuptools)) (propagated-inputs - (list python-numpy-2)) + (list python-numpy)) (home-page "https://github.com/pydata/numexpr") (synopsis "Fast numerical expression evaluator for NumPy") (description