From de1618552c9956bf2c5915d94c584a017e3c4a3d Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Mon, 6 May 2024 14:13:20 +0200 Subject: [PATCH] sage: Add as passthru.tests to critical dependencies --- pkgs/applications/science/math/lrcalc/default.nix | 5 +++++ pkgs/development/python-modules/cypari2/default.nix | 5 +++++ pkgs/development/python-modules/cysignals/default.nix | 5 +++++ pkgs/development/python-modules/cython/default.nix | 5 +++++ pkgs/development/python-modules/fpylll/default.nix | 5 +++++ pkgs/development/python-modules/gmpy2/default.nix | 5 +++++ .../python-modules/importlib-metadata/default.nix | 5 +++++ .../python-modules/importlib-resources/default.nix | 5 +++++ pkgs/development/python-modules/ipykernel/default.nix | 4 ++++ pkgs/development/python-modules/ipython/default.nix | 5 +++++ pkgs/development/python-modules/jinja2/default.nix | 5 +++++ pkgs/development/python-modules/jupyter-core/default.nix | 5 +++++ pkgs/development/python-modules/matplotlib/default.nix | 5 +++++ pkgs/development/python-modules/memory-allocator/default.nix | 5 +++++ pkgs/development/python-modules/mpmath/default.nix | 5 +++++ pkgs/development/python-modules/networkx/default.nix | 5 +++++ pkgs/development/python-modules/numpy/default.nix | 4 ++++ pkgs/development/python-modules/pexpect/default.nix | 5 +++++ pkgs/development/python-modules/pillow/default.nix | 4 ++-- pkgs/development/python-modules/pplpy/default.nix | 5 +++++ pkgs/development/python-modules/primecountpy/default.nix | 5 +++++ pkgs/development/python-modules/scipy/default.nix | 4 ++++ pkgs/development/python-modules/sympy/default.nix | 5 +++++ 23 files changed, 109 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/science/math/lrcalc/default.nix b/pkgs/applications/science/math/lrcalc/default.nix index 90ee50c68280..0d968e016179 100644 --- a/pkgs/applications/science/math/lrcalc/default.nix +++ b/pkgs/applications/science/math/lrcalc/default.nix @@ -1,6 +1,9 @@ { lib, stdenv , fetchFromBitbucket , autoreconfHook + +# Reverse dependency +, sage }: stdenv.mkDerivation rec { @@ -20,6 +23,8 @@ stdenv.mkDerivation rec { autoreconfHook ]; + passthru.tests = { inherit sage; }; + meta = with lib; { description = "Littlewood-Richardson calculator"; homepage = "http://math.rutgers.edu/~asbuch/lrcalc/"; diff --git a/pkgs/development/python-modules/cypari2/default.nix b/pkgs/development/python-modules/cypari2/default.nix index 025692de1f74..315492e38ee3 100644 --- a/pkgs/development/python-modules/cypari2/default.nix +++ b/pkgs/development/python-modules/cypari2/default.nix @@ -7,6 +7,9 @@ , gmp , cython , cysignals + +# Reverse dependency +, sage }: buildPythonPackage rec { @@ -53,6 +56,8 @@ buildPythonPackage rec { make check ''; + passthru.tests = { inherit sage; }; + meta = with lib; { description = "Cython bindings for PARI"; license = licenses.gpl2Plus; diff --git a/pkgs/development/python-modules/cysignals/default.nix b/pkgs/development/python-modules/cysignals/default.nix index 62cc3dd30d8a..fc53c5c9f168 100644 --- a/pkgs/development/python-modules/cysignals/default.nix +++ b/pkgs/development/python-modules/cysignals/default.nix @@ -4,6 +4,9 @@ , buildPythonPackage , cython , pariSupport ? true, pari # for interfacing with the PARI/GP signal handler + +# Reverse dependency +, sage }: assert pariSupport -> pari != null; @@ -46,6 +49,8 @@ buildPythonPackage rec { enableParallelBuilding = true; + passthru.tests = { inherit sage; }; + meta = with lib; { description = "Interrupt and signal handling for Cython"; mainProgram = "cysignals-CSI"; diff --git a/pkgs/development/python-modules/cython/default.nix b/pkgs/development/python-modules/cython/default.nix index e73c09f40b01..fecb9cad26ce 100644 --- a/pkgs/development/python-modules/cython/default.nix +++ b/pkgs/development/python-modules/cython/default.nix @@ -8,6 +8,9 @@ , gdb , numpy , ncurses + +# Reverse dependency +, sage }: let @@ -57,6 +60,8 @@ in buildPythonPackage rec { doCheck = false; # doCheck = !stdenv.isDarwin; + passthru.tests = { inherit sage; }; + # force regeneration of generated code in source distributions # https://github.com/cython/cython/issues/5089 setupHook = ./setup-hook.sh; diff --git a/pkgs/development/python-modules/fpylll/default.nix b/pkgs/development/python-modules/fpylll/default.nix index 95358d5f4aaf..2b4571b53edb 100644 --- a/pkgs/development/python-modules/fpylll/default.nix +++ b/pkgs/development/python-modules/fpylll/default.nix @@ -15,6 +15,9 @@ , fplll , numpy +# Reverse dependency +, sage + # tests , pytestCheckHook }: @@ -72,6 +75,8 @@ buildPythonPackage rec { export PY_IGNORE_IMPORTMISMATCH=1 ''; + passthru.tests = { inherit sage; }; + meta = with lib; { description = "A Python interface for fplll"; changelog = "https://github.com/fplll/fpylll/releases/tag/${version}"; diff --git a/pkgs/development/python-modules/gmpy2/default.nix b/pkgs/development/python-modules/gmpy2/default.nix index b5a602d4f222..e3d4118c335b 100644 --- a/pkgs/development/python-modules/gmpy2/default.nix +++ b/pkgs/development/python-modules/gmpy2/default.nix @@ -5,6 +5,9 @@ , gmp , mpfr , libmpc + +# Reverse dependency +, sage }: let @@ -29,6 +32,8 @@ buildPythonPackage { pythonImportsCheck = [ "gmpy2" ]; + passthru.tests = { inherit sage; }; + meta = with lib; { description = "GMP/MPIR, MPFR, and MPC interface to Python 2.6+ and 3.x"; homepage = "https://github.com/aleaxit/gmpy/"; diff --git a/pkgs/development/python-modules/importlib-metadata/default.nix b/pkgs/development/python-modules/importlib-metadata/default.nix index 511424fb1983..df3106aac420 100644 --- a/pkgs/development/python-modules/importlib-metadata/default.nix +++ b/pkgs/development/python-modules/importlib-metadata/default.nix @@ -7,6 +7,9 @@ , typing-extensions , toml , zipp + +# Reverse dependency +, sage }: buildPythonPackage rec { @@ -41,6 +44,8 @@ buildPythonPackage rec { "importlib_metadata" ]; + passthru.tests = { inherit sage; }; + meta = with lib; { description = "Read metadata from Python packages"; homepage = "https://importlib-metadata.readthedocs.io/"; diff --git a/pkgs/development/python-modules/importlib-resources/default.nix b/pkgs/development/python-modules/importlib-resources/default.nix index a8407239cc40..1f4b01a41992 100644 --- a/pkgs/development/python-modules/importlib-resources/default.nix +++ b/pkgs/development/python-modules/importlib-resources/default.nix @@ -10,6 +10,9 @@ # dependencies , importlib-metadata +# Reverse dependency +, sage + # tests , jaraco-collections , pytestCheckHook @@ -46,6 +49,8 @@ buildPythonPackage rec { "importlib_resources" ]; + passthru.tests = { inherit sage; }; + meta = with lib; { description = "Read resources from Python packages"; homepage = "https://importlib-resources.readthedocs.io/"; diff --git a/pkgs/development/python-modules/ipykernel/default.nix b/pkgs/development/python-modules/ipykernel/default.nix index 394974103537..35cd3bad0aa4 100644 --- a/pkgs/development/python-modules/ipykernel/default.nix +++ b/pkgs/development/python-modules/ipykernel/default.nix @@ -18,6 +18,9 @@ , pyzmq , tornado , traitlets + +# Reverse dependency +, sage }: buildPythonPackage rec { @@ -63,6 +66,7 @@ buildPythonPackage rec { passthru.tests = { pytest = callPackage ./tests.nix { }; + inherit sage; }; meta = { diff --git a/pkgs/development/python-modules/ipython/default.nix b/pkgs/development/python-modules/ipython/default.nix index 7a10725f2451..577b78804907 100644 --- a/pkgs/development/python-modules/ipython/default.nix +++ b/pkgs/development/python-modules/ipython/default.nix @@ -29,6 +29,9 @@ , notebook , qtconsole +# Reverse dependency +, sage + # Test dependencies , pickleshare , pytest-asyncio @@ -106,6 +109,8 @@ buildPythonPackage rec { "test_clipboard_get" ]; + passthru.tests = { inherit sage; }; + meta = with lib; { description = "IPython: Productive Interactive Computing"; downloadPage = "https://github.com/ipython/ipython/"; diff --git a/pkgs/development/python-modules/jinja2/default.nix b/pkgs/development/python-modules/jinja2/default.nix index 1c260e37c7b0..80b87378a6e4 100644 --- a/pkgs/development/python-modules/jinja2/default.nix +++ b/pkgs/development/python-modules/jinja2/default.nix @@ -12,6 +12,9 @@ , setuptools , sphinxcontrib-log-cabinet , sphinx-issues + +# Reverse dependency +, sage }: buildPythonPackage rec { @@ -76,6 +79,8 @@ buildPythonPackage rec { inherit meta; }; + passthru.tests = { inherit sage; }; + meta = with lib; { changelog = "https://github.com/pallets/jinja/blob/${version}/CHANGES.rst"; description = "Very fast and expressive template engine"; diff --git a/pkgs/development/python-modules/jupyter-core/default.nix b/pkgs/development/python-modules/jupyter-core/default.nix index 799e098920a8..c1faa97b1ef8 100644 --- a/pkgs/development/python-modules/jupyter-core/default.nix +++ b/pkgs/development/python-modules/jupyter-core/default.nix @@ -7,6 +7,9 @@ , traitlets , pip , pytestCheckHook + +# Reverse dependency +, sage }: buildPythonPackage rec { @@ -61,6 +64,8 @@ buildPythonPackage rec { pythonImportsCheck = [ "jupyter_core" ]; + passthru.tests = { inherit sage; }; + meta = with lib; { description = "Base package on which Jupyter projects rely"; homepage = "https://jupyter.org/"; diff --git a/pkgs/development/python-modules/matplotlib/default.nix b/pkgs/development/python-modules/matplotlib/default.nix index bf1e7a86323e..a23b9540538c 100644 --- a/pkgs/development/python-modules/matplotlib/default.nix +++ b/pkgs/development/python-modules/matplotlib/default.nix @@ -69,6 +69,9 @@ # required for headless detection , libX11 , wayland + +# Reverse dependency +, sage }: let @@ -183,6 +186,8 @@ buildPythonPackage rec { }; }; + passthru.tests = { inherit sage; }; + env.MPLSETUPCFG = writeText "mplsetup.cfg" (lib.generators.toINI {} passthru.config); # Encountering a ModuleNotFoundError, as describved and investigated at: diff --git a/pkgs/development/python-modules/memory-allocator/default.nix b/pkgs/development/python-modules/memory-allocator/default.nix index c4ddc5d06a1b..34dd55bb8dc6 100644 --- a/pkgs/development/python-modules/memory-allocator/default.nix +++ b/pkgs/development/python-modules/memory-allocator/default.nix @@ -2,6 +2,9 @@ , fetchPypi , buildPythonPackage , cython + +# Reverse dependency +, sage }: buildPythonPackage rec { @@ -19,6 +22,8 @@ buildPythonPackage rec { pythonImportsCheck = [ "memory_allocator" ]; + passthru.tests = { inherit sage; }; + meta = with lib; { description = "An extension class to allocate memory easily with cython"; homepage = "https://github.com/sagemath/memory_allocator/"; diff --git a/pkgs/development/python-modules/mpmath/default.nix b/pkgs/development/python-modules/mpmath/default.nix index 1a8e4c030979..20e7049ac370 100644 --- a/pkgs/development/python-modules/mpmath/default.nix +++ b/pkgs/development/python-modules/mpmath/default.nix @@ -5,6 +5,9 @@ , isPyPy , setuptools , pytestCheckHook + +# Reverse dependency +, sage }: buildPythonPackage rec { @@ -29,6 +32,8 @@ buildPythonPackage rec { ]; }; + passthru.tests = { inherit sage; }; + nativeCheckInputs = [ pytestCheckHook ]; diff --git a/pkgs/development/python-modules/networkx/default.nix b/pkgs/development/python-modules/networkx/default.nix index 40a6cdcf4b2e..ac0bd456bcda 100644 --- a/pkgs/development/python-modules/networkx/default.nix +++ b/pkgs/development/python-modules/networkx/default.nix @@ -19,6 +19,9 @@ # tests , pytest-xdist , pytestCheckHook + +# reverse dependency +, sage }: buildPythonPackage rec { @@ -53,6 +56,8 @@ buildPythonPackage rec { ]; }; + passthru.tests = { inherit sage; }; + nativeCheckInputs = [ pytest-xdist pytestCheckHook diff --git a/pkgs/development/python-modules/numpy/default.nix b/pkgs/development/python-modules/numpy/default.nix index c2d38cc31b24..f0acca333f85 100644 --- a/pkgs/development/python-modules/numpy/default.nix +++ b/pkgs/development/python-modules/numpy/default.nix @@ -19,6 +19,9 @@ , blas , lapack +# Reverse dependency +, sage + # tests , hypothesis , pytest-xdist @@ -177,6 +180,7 @@ in buildPythonPackage rec { blas = blas.provider; blasImplementation = blas.implementation; inherit cfg; + tests = { inherit sage; }; }; # Disable test diff --git a/pkgs/development/python-modules/pexpect/default.nix b/pkgs/development/python-modules/pexpect/default.nix index e8c5efc3cba3..f98e531c0d54 100644 --- a/pkgs/development/python-modules/pexpect/default.nix +++ b/pkgs/development/python-modules/pexpect/default.nix @@ -3,6 +3,9 @@ , fetchPypi , setuptools , ptyprocess + +# Reverse dependency +, sage }: buildPythonPackage (rec { @@ -24,6 +27,8 @@ buildPythonPackage (rec { propagatedBuildInputs = [ ptyprocess ]; + passthru.tests = { inherit sage; }; + meta = with lib; { homepage = "http://www.noah.org/wiki/Pexpect"; description = "Automate interactive console applications such as ssh, ftp, etc"; diff --git a/pkgs/development/python-modules/pillow/default.nix b/pkgs/development/python-modules/pillow/default.nix index a576b47bda19..f320000eecdc 100644 --- a/pkgs/development/python-modules/pillow/default.nix +++ b/pkgs/development/python-modules/pillow/default.nix @@ -7,7 +7,7 @@ , defusedxml, olefile, freetype, libjpeg, zlib, libtiff, libwebp, libxcrypt, tcl, lcms2, tk, libX11 , libxcb, openjpeg, libimagequant, numpy, pytestCheckHook, setuptools # for passthru.tests -, imageio, matplotlib, pilkit, pydicom, reportlab +, imageio, matplotlib, pilkit, pydicom, reportlab, sage }@args: import ./generic.nix (rec { @@ -24,7 +24,7 @@ import ./generic.nix (rec { }; passthru.tests = { - inherit imageio matplotlib pilkit pydicom reportlab; + inherit imageio matplotlib pilkit pydicom reportlab sage; }; meta = with lib; { diff --git a/pkgs/development/python-modules/pplpy/default.nix b/pkgs/development/python-modules/pplpy/default.nix index 641008be07fc..4a4d97c554cf 100644 --- a/pkgs/development/python-modules/pplpy/default.nix +++ b/pkgs/development/python-modules/pplpy/default.nix @@ -9,6 +9,9 @@ , cysignals , gmpy2 , sphinx + +# Reverse dependency +, sage }: buildPythonPackage rec { @@ -54,6 +57,8 @@ buildPythonPackage rec { mv docs/build/html "$doc/share/doc/pplpy" ''; + passthru.tests = { inherit sage; }; + meta = with lib; { description = "A Python wrapper for ppl"; homepage = "https://gitlab.com/videlec/pplpy"; diff --git a/pkgs/development/python-modules/primecountpy/default.nix b/pkgs/development/python-modules/primecountpy/default.nix index 463a0cf50be6..60ae77e7dd94 100644 --- a/pkgs/development/python-modules/primecountpy/default.nix +++ b/pkgs/development/python-modules/primecountpy/default.nix @@ -4,6 +4,9 @@ , primecount , cython , cysignals + +# Reverse dependency +, sage }: buildPythonPackage rec { @@ -25,6 +28,8 @@ buildPythonPackage rec { pythonImportsCheck = [ "primecountpy" ]; + passthru.tests = { inherit sage; }; + meta = with lib; { description = "Cython interface for C++ primecount library"; homepage = "https://github.com/dimpase/primecountpy/"; diff --git a/pkgs/development/python-modules/scipy/default.nix b/pkgs/development/python-modules/scipy/default.nix index 64e261c37403..57769c7f6afe 100644 --- a/pkgs/development/python-modules/scipy/default.nix +++ b/pkgs/development/python-modules/scipy/default.nix @@ -25,6 +25,9 @@ , xsimd , blas , lapack + +# Reverse dependency +, sage }: let @@ -193,6 +196,7 @@ in buildPythonPackage { # Pass it the names of the datasets to update their hashes ++ (builtins.attrNames datasetsHashes) ; + tests = { inherit sage; }; }; SCIPY_USE_G77_ABI_WRAPPER = 1; diff --git a/pkgs/development/python-modules/sympy/default.nix b/pkgs/development/python-modules/sympy/default.nix index d2a10492153e..1954f8bc591f 100644 --- a/pkgs/development/python-modules/sympy/default.nix +++ b/pkgs/development/python-modules/sympy/default.nix @@ -3,6 +3,9 @@ , fetchPypi , glibcLocales , mpmath + +# Reverse dependency +, sage }: buildPythonPackage rec { @@ -27,6 +30,8 @@ buildPythonPackage rec { export LANG="en_US.UTF-8" ''; + passthru.tests = { inherit sage; }; + meta = with lib; { description = "A Python library for symbolic mathematics"; mainProgram = "isympy";