diff --git a/pkgs/development/python-modules/boxx/default.nix b/pkgs/development/python-modules/boxx/default.nix index 1a0821f7d5fb5..a973f64780d62 100644 --- a/pkgs/development/python-modules/boxx/default.nix +++ b/pkgs/development/python-modules/boxx/default.nix @@ -2,15 +2,12 @@ lib, buildPythonPackage, fetchPypi, - python, - xvfb-run, matplotlib, scikit-image, numpy, pandas, imageio, snakeviz, - fn, pyopengl, seaborn, torch, @@ -37,21 +34,29 @@ buildPythonPackage rec { pandas imageio snakeviz - fn pyopengl seaborn ]; nativeCheckInputs = [ - xvfb-run torch torchvision ]; pythonImportsCheck = [ "boxx" ]; + # The tests are just a bunch of files with code in them (yikes) + # intead of normal classes/functions representing test cases. + # Standard test discovery mechanisms in unittest/pytest complain + # that no tests were discovered, so we run the files manually. checkPhase = '' - xvfb-run ${python.interpreter} -m unittest + export MPLCONFIGDIR=$(mktemp -d) + TESTS=$(find test -type f -name '*.py' | sed 's|test/\([^.]*\).py|\1|g') + touch test/__init__.py + for test in $TESTS; do + echo "Running test "$test"..." + python -m test.$test + done ''; meta = with lib; { diff --git a/pkgs/development/python-modules/bpycv/default.nix b/pkgs/development/python-modules/bpycv/default.nix index 923c4d0ced495..da2638fec4595 100644 --- a/pkgs/development/python-modules/bpycv/default.nix +++ b/pkgs/development/python-modules/bpycv/default.nix @@ -48,7 +48,10 @@ buildPythonPackage rec { }; } '' - ${blender.withPackages (ps: [ ps.bpycv ])}/bin/blender-wrapped -b -P ${./bpycv-test.py} + ${blender.withPackages (ps: [ ps.bpycv ])}/bin/blender-wrapped \ + --background \ + --python ${./bpycv-test.py} \ + --python-exit-code 42 ''; }; diff --git a/pkgs/development/python-modules/fn/default.nix b/pkgs/development/python-modules/fn/default.nix deleted file mode 100644 index 186937474c9fa..0000000000000 --- a/pkgs/development/python-modules/fn/default.nix +++ /dev/null @@ -1,39 +0,0 @@ -{ - lib, - buildPythonPackage, - fetchpatch, - fetchPypi, - pythonAtLeast, -}: - -buildPythonPackage rec { - pname = "fn"; - version = "0.4.3"; - format = "setuptools"; - - # Python 3.11 changed the API of the `inspect` module and fn was never - # updated to adapt; last commit was in 2014. - disabled = pythonAtLeast "3.11"; - - src = fetchPypi { - inherit pname version; - sha256 = "1nmsjmn8jb4gp22ksx0j0hhdf4y0zm8rjykyy2i6flzimg6q1kgq"; - }; - - patches = [ - (fetchpatch { - url = "https://github.com/kachayev/fn.py/commit/a54fc0bd8aeae277de2db726131d249ce607c0c2.patch"; - hash = "sha256-I0ZISOgVibsc1k7gwSfeW6qV9PspQqdaHlRLr/IusQ8="; - excludes = [ "fn/monad.py" ]; - }) - ]; - - meta = with lib; { - description = '' - Functional programming in Python: implementation of missing - features to enjoy FP - ''; - homepage = "https://github.com/kachayev/fn.py"; - license = licenses.asl20; - }; -} diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index 64b03f05f4cff..4fcd89a79536e 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -238,6 +238,7 @@ mapAliases ({ flufl_bounce = flufl-bounce; # added 2023-11-03 flufl_i18n = flufl-i18n; # added 2023-11-03 flufl_lock = flufl-lock; # added 2023-11-03 + fn = throw "fn was removed, as it is no longer used by any package in nixpkgs, it is not compatible with python 3.11 or newer and it was last updated in 2014."; # added 2025-02-08 forbiddenfruit = throw "forbiddenfruit has been removed, because it was unmaintained and relied on the nose test framework"; # added 2024-07-08 FormEncode = formencode; # added 2023-02-19 foundationdb51 = throw "foundationdb51 is no longer maintained, use foundationdb71 instead"; # added 2023-06-06 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index a51a956972de2..257a2d6e3ba28 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4867,8 +4867,6 @@ self: super: with self; { flynt = callPackage ../development/python-modules/flynt { }; - fn = callPackage ../development/python-modules/fn { }; - fnv-hash-fast = callPackage ../development/python-modules/fnv-hash-fast { }; fnvhash = callPackage ../development/python-modules/fnvhash { };