From c9e65ff7d8b416cd6d845f75624d0a8aca08fdfe Mon Sep 17 00:00:00 2001 From: Nicolas Graves Date: Fri, 21 Nov 2025 19:28:18 +0100 Subject: [PATCH] gnu: python-crayons: Switch to pyproject. * gnu/packages/python-xyz.scm (python-crayons): [source]: Switch to git-fetch. [build-system]: Switch to pyproject-build-system. [arguments]<#:test-backend, test-flags>: Set them. [native-inputs]: Add python-setuptools. [description]: Improve style. Change-Id: I86d1117fd720bb2c0c671612415448f4baf76bf3 Signed-off-by: Sharlatan Hellseher --- gnu/packages/python-xyz.scm | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 8f11ec94ed0f9ba2ce3caddecf154cd9c535f699..2b58a05a5681a28fddedf4e01d05a7685d0bec4a 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -31971,20 +31971,27 @@ used to retry a function a given number of times.") (name "python-crayons") (version "0.4.0") (source - (origin - (method url-fetch) - (uri (pypi-uri "crayons" version)) - (sha256 - (base32 - "0gw106k4b6y8mw7pp52awxyplj2bwvwk315k4sywzwh0g1abfcxx")))) - (build-system python-build-system) - (propagated-inputs - (list python-colorama)) + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/MasterOdin/crayons") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0zmls5c67mxyxzlwvagiidlrxy1f6f8kwm5afjsydhn19h4rd7za")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-backend #~'custom + #:test-flags #~(list "test_crayons.py"))) + (native-inputs (list python-setuptools)) + (propagated-inputs (list python-colorama)) (home-page "https://github.com/MasterOdin/crayons") (synopsis "TextUI colors for Python") - (description "This package gives you colored strings for the terminal. -Crayons automatically wraps a given string in the foreground color and -restores the original state after the string is printed.") + (description + "This package gives you colored strings for the terminal. Crayons +automatically wraps a given string in the foreground color and restores the +original state after the string is printed.") (license license:expat))) (define-public python-sane