diff options
author | Fabian Affolter <mail@fabian-affolter.ch> | 2022-01-13 18:38:47 +0100 |
---|---|---|
committer | Fabian Affolter <mail@fabian-affolter.ch> | 2022-01-13 18:38:47 +0100 |
commit | 37076fc603a3d38340065f7eebbd4cef0ac2dfc5 (patch) | |
tree | 0bbff6567acd68ece55e0951d4c7b1146c20a589 /pkgs/development/python-modules/boltons | |
parent | 36797a3c65dbe83c5c52cb34f4fdb5bff6409a0e (diff) | |
download | nixpkgs-37076fc603a3d38340065f7eebbd4cef0ac2dfc5.tar nixpkgs-37076fc603a3d38340065f7eebbd4cef0ac2dfc5.tar.gz nixpkgs-37076fc603a3d38340065f7eebbd4cef0ac2dfc5.tar.bz2 nixpkgs-37076fc603a3d38340065f7eebbd4cef0ac2dfc5.tar.lz nixpkgs-37076fc603a3d38340065f7eebbd4cef0ac2dfc5.tar.xz nixpkgs-37076fc603a3d38340065f7eebbd4cef0ac2dfc5.tar.zst nixpkgs-37076fc603a3d38340065f7eebbd4cef0ac2dfc5.zip |
python3Packages.boltons: add patch for pprint
Diffstat (limited to 'pkgs/development/python-modules/boltons')
-rw-r--r-- | pkgs/development/python-modules/boltons/default.nix | 35 |
1 files changed, 24 insertions, 11 deletions
diff --git a/pkgs/development/python-modules/boltons/default.nix b/pkgs/development/python-modules/boltons/default.nix index 0986a5dc7c4..f884e164d63 100644 --- a/pkgs/development/python-modules/boltons/default.nix +++ b/pkgs/development/python-modules/boltons/default.nix @@ -3,40 +3,53 @@ , fetchFromGitHub , fetchpatch , pytestCheckHook +, pythonAtLeast +, pythonOlder }: buildPythonPackage rec { pname = "boltons"; version = "20.2.1"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; - # No tests in PyPi Tarball src = fetchFromGitHub { owner = "mahmoud"; repo = "boltons"; rev = version; - sha256 = "0vw0h0z81gfxgjfijqiza92ic0siv9xy65mklgj5d0dzr1k9waw8"; + hash = "sha256-iCueZsi/gVbko7MW43vaUQMWRVI/YhmdfN29gD6AgG8="; }; - patches = [ + checkInputs = [ + pytestCheckHook + ]; + + patches = lib.optionals (pythonAtLeast "3.10") [ + # pprint has no attribute _safe_repr, https://github.com/mahmoud/boltons/issues/294 (fetchpatch { - url = "https://github.com/mahmoud/boltons/commit/754afddf141ea26956c88c7e13fe5e7ca7942654.patch"; - sha256 = "14kcq8pl4pmgcnlnmj1sh1yrksgym0kn0kgz2648g192svqkbpz8"; + name = "fix-pprint-attribute.patch"; + url = "https://github.com/mahmoud/boltons/commit/270e974975984f662f998c8f6eb0ebebd964de82.patch"; + sha256 = "sha256-pZLfr6SRCw2aLwZeYaX7bzfJeZC4cFUILEmnVsKR6zc="; }) ]; - checkInputs = [ pytestCheckHook ]; disabledTests = [ - # This test is broken without this PR, which has not yet been merged + # This test is broken without this PR. Merged but not released # https://github.com/mahmoud/boltons/pull/283 - "test_frozendict_ior" + "test_frozendict" + ]; + + pythonImportsCheck = [ + "boltons" ]; meta = with lib; { homepage = "https://github.com/mahmoud/boltons"; - description = "220+ constructs, recipes, and snippets extending (and relying on nothing but) the Python standard library"; + description = "Constructs, recipes, and snippets extending the Python standard library"; longDescription = '' - Boltons is a set of over 220 BSD-licensed, pure-Python utilities - in the same spirit as — and yet conspicuously missing from — the + Boltons is a set of over 200 BSD-licensed, pure-Python utilities + in the same spirit as - and yet conspicuously missing from - the standard library, including: - Atomic file saving, bolted on with fileutils |