From 70a357a075e1683081ae42898f25455b05c1c4cc Mon Sep 17 00:00:00 2001 From: natsukium Date: Sun, 8 Oct 2023 12:10:10 +0900 Subject: [PATCH 1/2] python311Packages.beancount-docverif: rename from beancount_docverif --- .../{beancount_docverif => beancount-docverif}/default.nix | 5 +++-- pkgs/top-level/python-aliases.nix | 1 + pkgs/top-level/python-packages.nix | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) rename pkgs/development/python-modules/{beancount_docverif => beancount-docverif}/default.nix (94%) diff --git a/pkgs/development/python-modules/beancount_docverif/default.nix b/pkgs/development/python-modules/beancount-docverif/default.nix similarity index 94% rename from pkgs/development/python-modules/beancount_docverif/default.nix rename to pkgs/development/python-modules/beancount-docverif/default.nix index 521652f8424d..34c0460baed8 100644 --- a/pkgs/development/python-modules/beancount_docverif/default.nix +++ b/pkgs/development/python-modules/beancount-docverif/default.nix @@ -6,12 +6,13 @@ buildPythonPackage rec { version = "1.0.1"; - pname = "beancount_docverif"; + pname = "beancount-docverif"; disabled = !isPy3k; src = fetchPypi { - inherit pname version; + pname = "beancount_docverif"; + inherit version; hash = "sha256-CFBv1FZP5JO+1MPnD86ttrO42zZlvE157zqig7s4HOg="; }; diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index 74e3d05a3bb2..56f2244818fb 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -56,6 +56,7 @@ mapAliases ({ backports_tempfile = throw "backports_tempfile has been removed, since we no longer need to backport to python3.3"; # added 2023-07-28 backports_unittest-mock = throw "backports_unittest-mock has been removed, since we no longer need to backport to python3.2"; # added 2023-07-28 backports_weakref = throw "backports_weakref has been removed, since we no longer need to backport to python3.3"; # added 2023-07-28 + beancount_docverif = beancount-docverif; # added 2023-10-08 bedup = throw "bedup was removed because it was broken and abandoned upstream"; # added 2023-02-04 bitcoin-price-api = throw "bitcoin-price-api has been removed, it was using setuptools 2to3 translation feautre, which has been removed in setuptools 58"; # added 2022-02-15 BlinkStick = blinkstick; # added 2023-02-19 diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 8768daa8771e..a1dd74510a35 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1364,7 +1364,7 @@ self: super: with self; { beancount-parser = callPackage ../development/python-modules/beancount-parser { }; - beancount_docverif = callPackage ../development/python-modules/beancount_docverif { }; + beancount-docverif = callPackage ../development/python-modules/beancount-docverif { }; beanstalkc = callPackage ../development/python-modules/beanstalkc { }; From b0be1e86a13ff3b7939c2e11f355b2459b3b8f52 Mon Sep 17 00:00:00 2001 From: natsukium Date: Sun, 8 Oct 2023 12:14:39 +0900 Subject: [PATCH 2/2] python311Packages.beancount-docverif: refactor --- .../python-modules/beancount-docverif/default.nix | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/beancount-docverif/default.nix b/pkgs/development/python-modules/beancount-docverif/default.nix index 34c0460baed8..d614b2f12d4f 100644 --- a/pkgs/development/python-modules/beancount-docverif/default.nix +++ b/pkgs/development/python-modules/beancount-docverif/default.nix @@ -1,14 +1,13 @@ -{ lib, buildPythonPackage, fetchPypi, isPy3k +{ lib, buildPythonPackage, fetchPypi , setuptools-scm , beancount -, pytest, sh +, pytestCheckHook }: buildPythonPackage rec { version = "1.0.1"; pname = "beancount-docverif"; - - disabled = !isPy3k; + pyproject = true; src = fetchPypi { pname = "beancount_docverif"; @@ -25,14 +24,9 @@ buildPythonPackage rec { ]; nativeCheckInputs = [ - pytest - sh + pytestCheckHook ]; - checkPhase = '' - pytest - ''; - meta = with lib; { homepage = "https://github.com/siriobalmelli/beancount_docverif"; description = "Document verification plugin for Beancount";