Skip to content

Commit

Permalink
Merge pull request #330705 from Sigmanificient/pprintpp
Browse files Browse the repository at this point in the history
python312Packages.pprintpp: drop nose dependency
  • Loading branch information
emilazy authored Jul 31, 2024
2 parents a6100a4 + 76453af commit 241af39
Showing 1 changed file with 8 additions and 26 deletions.
34 changes: 8 additions & 26 deletions pkgs/development/python-modules/pprintpp/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,27 @@
lib,
buildPythonPackage,
fetchpatch,
fetchPypi,
nose,
parameterized,
fetchFromGitHub,
pytestCheckHook,
pythonOlder,
setuptools,
}:

buildPythonPackage rec {
pname = "pprintpp";
version = "0.4.0";
version = "0.4.0-unstable-2022-05-31";
pyproject = true;

disabled = pythonOlder "3.7";

src = fetchPypi {
inherit pname version;
hash = "sha256-6oJhCOLH9J3G1mx1KXPD/JdJFCp5jWslTh4wHP28ZAM=";
src = fetchFromGitHub {
owner = "joaonc";
repo = "pprintpp2";
rev = "303f0652c9420f2cf0a0f4fe1907377508a17b3d"; # no tags
hash = "sha256-rjOf38m5mzIyJ3aVrD0+WQuzIyFjfa/4zmpFGGhF2hs=";
};

patches = [
# Replace nose-parameterized with parameterized, https://github.com/wolever/pprintpp/pull/21
(fetchpatch {
url = "https://github.com/wolever/pprintpp/commit/873217674cc824b4c1cfdad4867c560c60e8d806.patch";
hash = "sha256-Y+2yVUkDHkwo49ynNHYXVXJpX4DfVYJ0CWKgzFX/HWc=";
})
# Remove "U" move from open(), https://github.com/wolever/pprintpp/pull/31
(fetchpatch {
name = "remove-u.patch";
Expand All @@ -38,22 +33,9 @@ buildPythonPackage rec {

build-system = [ setuptools ];

nativeCheckInputs = [
nose
parameterized
pytestCheckHook
];

pythonImportsCheck = [ "pprintpp" ];

pytestFlagsArray = [ "test.py" ];

disabledTests = [
# AttributeError: 'EncodedFile' object has no attribute 'getvalue'
"test_pp"
"test_pp_pprint"
"test_fmt"
];
nativeCheckInputs = [ pytestCheckHook ];

meta = with lib; {
description = "Drop-in replacement for pprint that's actually pretty";
Expand Down

0 comments on commit 241af39

Please sign in to comment.