From 146cf4c306ac2d534a0b35af03112c883f160390 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 9 Sep 2023 15:31:50 +0800 Subject: [PATCH] gnu: Add python-dirty-equals. * gnu/packages/python-xyz.scm (python-dirty-equals): New variable. --- gnu/packages/python-xyz.scm | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index e90333cadf..2c8a4c3019 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -26,7 +26,7 @@ ;;; Copyright © 2016, 2017 Nikita ;;; Copyright © 2016 Dylan Jeffers ;;; Copyright © 2016 David Craven -;;; Copyright © 2016-2022 Marius Bakke +;;; Copyright © 2016-2023 Marius Bakke ;;; Copyright © 2016, 2017, 2021, 2022 Stefan Reichör ;;; Copyright © 2016, 2017, 2019 Alex Vong ;;; Copyright © 2016–2018, 2021–2023 Arun Isaac @@ -8513,6 +8513,38 @@ (define-public python-autopep8 (license (license:non-copyleft "https://github.com/hhatto/autopep8/blob/master/LICENSE")))) +(define-public python-dirty-equals + (package + (name "python-dirty-equals") + (version "0.7.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/samuelcolvin/dirty-equals") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1hw044d6q0ij8hrrbp6wbdb49xbyjd22viansy817hpmd0yf85ja")))) + (build-system pyproject-build-system) + (arguments + ;; This test requires pytest-examples, which in turn requires + ;; python-ruff, which is difficult to package because it is + ;; written in Rust (TODO: Enable when Ruff is in Guix!). + (list #:test-flags #~'("--ignore" "tests/test_docs.py"))) + (native-inputs + (list python-hatchling + python-pydantic + python-pytest)) + (propagated-inputs (list python-pytz)) + (home-page "https://dirty-equals.helpmanual.io/") + (synopsis "Do dirty (but useful) things with equals") + (description + "@code{dirty-equals} is a Python library that (mis)uses the +@code{__eq__} method to make code (generally unit tests) more declarative +and therefore easier to read and write.") + (license license:expat))) + (define-public python-distlib (package (name "python-distlib")