diff options
| author | Nicolas Graves <ngraves@ngraves.fr> | 2025-10-03 14:49:46 +0200 |
|---|---|---|
| committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2025-10-03 21:53:27 +0100 |
| commit | aaf3bd6e07ae77426e191b9419d3a65b19fa58f6 (patch) | |
| tree | 231fc76b75a5e329ec229ca6722b5390ff72cc0e /gnu/packages/python-xyz.scm | |
| parent | fabab6beaaaee67838e930071a4261e3309744d3 (diff) | |
gnu: python-pastel: Switch to pyproject.
* gnu/packages/python-xyz.scm (python-pastel):
[source]: Switch to git-fetch.
[build-system]: Switch to pyproject-build-system.
[arguments]<#:phases>: Replace 'check phase by <#:test-flags>. Add
phase 'use-poetry-core.
[native-inputs]: Add python-poetry-core and python-pytest.
[description]: Improve style.
Change-Id: I93377196595f380fcb722d52d44cd69b5fe7133f
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
Diffstat (limited to 'gnu/packages/python-xyz.scm')
| -rw-r--r-- | gnu/packages/python-xyz.scm | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 39b7671c58..88e3e03c57 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -1317,22 +1317,31 @@ of Ordered Set.") (version "0.2.0") (source (origin - (method url-fetch) - (uri (pypi-uri "pastel" version)) + (method git-fetch) + (uri (git-reference + (url "https://github.com/sdispater/pastel") + (commit version))) + (file-name (git-file-name name version)) (sha256 - (base32 - "0dnaw44ss10i10z4ksy0xljknvjap7rb7g0b8p6yzm5x4g2my5a6")))) - (build-system python-build-system) + (base32 "016zqc41hjjm6szfjnzkmjl0y5q8y07i9792z2n71j9sirhas3b6")))) + (build-system pyproject-build-system) (arguments - `(#:phases (modify-phases %standard-phases - (replace 'check - (lambda _ (invoke "pytest" "pastel" "tests/")))))) - (native-inputs - (list python-pytest)) + (list + #:test-flags + #~(list "pastel" "tests/") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'use-poetry-core + (lambda _ + ;; Patch to use the core poetry API. + (substitute* "pyproject.toml" + (("poetry.masonry.api") "poetry.core.masonry.api"))))))) + (native-inputs (list python-poetry-core python-pytest)) (home-page "https://github.com/sdispater/pastel") (synopsis "Library to colorize strings in your terminal") - (description "Pastel is a simple library to help you colorize strings in -your terminal.") + (description + "Pastel is a simple library to help you colorize strings in your +terminal.") (license license:expat))) (define-public python-pathlib-abc |
