From 51436611e7fd01964d39ab8b56c17831432541be Mon Sep 17 00:00:00 2001 From: Nicolas Graves Date: Tue, 28 Oct 2025 18:06:17 +0100 Subject: [PATCH] gnu: python-dictdiffer: Switch to pyproject. * gnu/packages/python-xyz.scm (python-dictdiffer): [source]: Switch to git-fetch. [build-system]: Switch to pyproject-build-system. [arguments]<#:phases>: Add phases 'set-version and 'relax-requirements. [native-inputs]: Add python-setuptools. Replace python-pytest-runner by python-pytest. Change-Id: I8c10fce39d106df090df3ced8fed6680949ebefe Signed-off-by: Sharlatan Hellseher --- gnu/packages/python-xyz.scm | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 18d5224a1c47d4a76cb4923833c7c746fbc3a145..3bf050a619df1f872077df064a9412966fb5f02a 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -30387,19 +30387,31 @@ cryptographically signed ones).") (package (name "python-dictdiffer") (version "0.9.0") - (source (origin - (method url-fetch) - (uri (pypi-uri "dictdiffer" version)) - (sha256 - (base32 - "0y3mk74qm2q9hsm37892i1wzn8bbdrvbs4nmnvqwq4z6pxgwzfhp")))) - (build-system python-build-system) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/inveniosoftware/dictdiffer") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1rc5jhjxzphip43frrlplcayng2cah1bzbzv6hpxnnjhg6rqy34m")))) + (build-system pyproject-build-system) (arguments - ;; XXX: The PyPI tarball lacks tests and the git repository - ;; fails to determine version. - '(#:tests? #f)) + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'set-version + (lambda _ + (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version))) + (add-after 'unpack 'relax-requirements + (lambda _ + (delete-file "pytest.ini") + (substitute* "setup.py" + (("'pytest-runner.*',") + "'pytest',"))))))) (native-inputs - (list python-pytest-runner python-setuptools-scm)) + (list python-pytest python-setuptools python-setuptools-scm)) (home-page "https://github.com/inveniosoftware/dictdiffer") (synopsis "Diff and patch Python dictionary objects") (description