Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python312Packages.nose: fix, use pep517 builder #325935

Closed
wants to merge 17 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions pkgs/applications/graphics/hydrus/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
, enableSwftools ? false
, swftools
, python3Packages
, pythonOlder
, qtbase
, qtcharts
, makeDesktopItem
Expand Down Expand Up @@ -82,9 +81,6 @@ python3Packages.buildPythonPackage rec {
twisted
];

# tests rely on nose
doCheck = pythonOlder "3.12";

nativeCheckInputs = with python3Packages; [
nose
mock
Expand Down
3 changes: 0 additions & 3 deletions pkgs/development/python-modules/actdiag/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ buildPythonPackage rec {

propagatedBuildInputs = [ blockdiag ];

# tests rely on nose
doCheck = pythonOlder "3.12";

nativeCheckInputs = [
nose
pytestCheckHook
Expand Down
4 changes: 0 additions & 4 deletions pkgs/development/python-modules/biopandas/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@ buildPythonPackage rec {
looseversion
];

# tests rely on nose
# resolved in 0.5.1: https://github.com/BioPandas/biopandas/commit/67aa2f237c70c826cd9ab59d6ae114582da2112f
doCheck = pythonOlder "3.12";

nativeCheckInputs = [
nose
pytestCheckHook
Expand Down
3 changes: 0 additions & 3 deletions pkgs/development/python-modules/blockdiag/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ buildPythonPackage rec {
webcolors
];

# tests rely on nose
doCheck = pythonOlder "3.12";

nativeCheckInputs = [
ephem
nose
Expand Down
4 changes: 0 additions & 4 deletions pkgs/development/python-modules/hkdf/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
lib,
buildPythonPackage,
fetchFromGitHub,
pythonOlder,
nose,
setuptools,
}:
Expand All @@ -23,9 +22,6 @@ buildPythonPackage {

pythonImportsCheck = [ "hkdf" ];

# tests rely on nose
doCheck = pythonOlder "3.12";

nativeCheckInputs = [ nose ];

checkPhase = ''
Expand Down
4 changes: 0 additions & 4 deletions pkgs/development/python-modules/lockfile/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
setuptools,
pbr,
nose,
pythonOlder,
}:

buildPythonPackage rec {
Expand All @@ -23,9 +22,6 @@ buildPythonPackage rec {
setuptools
];

# tests rely on nose
doCheck = pythonOlder "3.12";

nativeCheckInputs = [ nose ];

checkPhase = ''
Expand Down
27 changes: 20 additions & 7 deletions pkgs/development/python-modules/nose/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,35 @@
isPy3k,
isPyPy,
python,
pythonAtLeast,
python312,
coverage,
setuptools,
fetchpatch2,
}:

buildPythonPackage rec {
version = "1.3.7";
format = "setuptools";
pname = "nose";

# unmaintained, relies on the imp module
disabled = pythonAtLeast "3.12";
pyproject = true;

src = fetchPypi {
inherit pname version;
sha256 = "f1bffef9cbc82628f6e7d7b40d7e255aefaa1adb6a1b1d26c69a8b79e6208a98";
};

build-system = [ setuptools ];

patches = [
(fetchpatch2 {
url = "https://gitlab.alpinelinux.org/alpine/aports/-/raw/71a773b0618ce60d276a3df74ed69e6bd6d13237/community/py3-nose/python-nose-py311.patch";
hash = "sha256-CwY1pxzFFD0AYgmbERQyb6dD3bSInTqteUM85nfYkq8=";
})
(fetchpatch2 {
url = "https://gitlab.alpinelinux.org/alpine/aports/-/raw/71a773b0618ce60d276a3df74ed69e6bd6d13237/community/py3-nose/python-nose-py312.patch";
hash = "sha256-/mJHbal8XXOWvLtebrYmoK23rCNp+VWIFYDPUckEEGg=";
})
];

# 2to3 was removed in setuptools 58
postPatch = ''
substituteInPlace setup.py \
Expand All @@ -31,8 +43,9 @@ buildPythonPackage rec {
--replace "from setuptools.command.build_py import Mixin2to3" "from distutils.util import Mixin2to3"
'';

preBuild = lib.optionalString (isPy3k) ''
${python.pythonOnBuildForHost}/bin/2to3 -wn nose functional_tests unit_tests
# Python 3.12 is the last version to ship 2to3.
preBuild = lib.optionalString isPy3k ''
${python312.pythonOnBuildForHost}/bin/2to3 -wn nose functional_tests unit_tests
'';

propagatedBuildInputs = [ coverage ];
Expand Down
3 changes: 0 additions & 3 deletions pkgs/development/python-modules/nwdiag/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ buildPythonPackage rec {

dependencies = [ blockdiag ];

# tests rely on nose
doCheck = pythonOlder "3.12";

nativeCheckInputs = [
nose
pytestCheckHook
Expand Down
3 changes: 0 additions & 3 deletions pkgs/development/python-modules/pprintpp/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ buildPythonPackage rec {

build-system = [ setuptools ];

# tests rely on nose
doCheck = pythonOlder "3.12";

nativeCheckInputs = [
nose
parameterized
Expand Down
4 changes: 0 additions & 4 deletions pkgs/development/python-modules/pydy/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
lib,
buildPythonPackage,
fetchPypi,
pythonOlder,
numpy,
scipy,
sympy,
Expand All @@ -29,9 +28,6 @@ buildPythonPackage rec {
sympy
];

# tests rely on nose
doCheck = pythonOlder "3.12";

nativeCheckInputs = [
nose
cython
Expand Down
2 changes: 0 additions & 2 deletions pkgs/development/python-modules/pypass/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ buildPythonPackage rec {
pexpect
];

doCheck = pythonOlder "3.12";

nativeCheckInputs = [ nose ];

# Configuration so that the tests work
Expand Down
3 changes: 0 additions & 3 deletions pkgs/development/python-modules/pytimeparse/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ buildPythonPackage rec {

build-system = [ setuptools ];

# tests rely on nose
doCheck = pythonOlder "3.12";

nativeCheckInputs = [ nose ];

pythonImportsCheck = [ "pytimeparse" ];
Expand Down
3 changes: 0 additions & 3 deletions pkgs/development/python-modules/seqdiag/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ buildPythonPackage rec {

dependencies = [ blockdiag ];

# tests rely on nose
doCheck = pythonOlder "3.12";

nativeCheckInputs = [
nose
pytestCheckHook
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ buildPythonPackage rec {

dependencies = [ sphinx-rtd-theme ];

# tests rely on nose
doCheck = pythonOlder "3.12";

nativeCheckInputs = [
nose
sphinx
Expand Down
4 changes: 0 additions & 4 deletions pkgs/development/python-modules/uvcclient/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
lib,
buildPythonPackage,
fetchFromGitHub,
pythonOlder,
nose,
mock,
}:
Expand All @@ -24,9 +23,6 @@ buildPythonPackage rec {
--replace-fail "assertEquals" "assertEqual"
'';

# tests rely on nose
doCheck = pythonOlder "3.12";

nativeCheckInputs = [
nose
mock
Expand Down
3 changes: 0 additions & 3 deletions pkgs/development/python-modules/xlwt/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ buildPythonPackage rec {

build-system = [ setuptools ];

# tests rely on nose, archived in 2020
doCheck = pythonOlder "3.12";

nativeCheckInputs = [ nose ];

checkPhase = ''
Expand Down