From 4c2599bdb0ed991d6b5e95d52dc6ccc28810cedc Mon Sep 17 00:00:00 2001 From: Nicolas Graves Date: Fri, 3 Oct 2025 15:30:53 +0200 Subject: [PATCH] gnu: python-mkdocs: Switch to pyproject. * gnu/packages/python-xyz.scm (python-mkdocs): [build-system]: Switch to pyproject-build-system. [arguments]: Set <#:test-backend> and <#:test-flags>. <#:phases>: Remove 'check phase replacement. [native-inputs]: Add python-setuptools. Change-Id: Ia8588b9faf89c64f6654ec5c14f59e819752b384 Signed-off-by: Sharlatan Hellseher --- gnu/packages/python-xyz.scm | 38 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 4710c9ff33ef9ecf049c647a9215d34987165dd4..55a0c68dd4747fd67ba40837756c044b628cfda8 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -2971,31 +2971,28 @@ that best match text queries.") (version "1.3.0") (source (origin - ;; The tests suite appears to be incomplete in the PyPI archive. (method git-fetch) (uri (git-reference (url "https://github.com/mkdocs/mkdocs") (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 - "1n5rdllrxvhnxmdrddf55p3s86dakx0rq2gg6bj6pr6jg2pn932b")))) - (build-system python-build-system) + (base32 "1n5rdllrxvhnxmdrddf55p3s86dakx0rq2gg6bj6pr6jg2pn932b")))) + (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - ;; Requirements refer to a specific version of dependencies, - ;; which are too old. So we patch to refer to any later version. - (add-after 'unpack 'patch-requirements - (lambda _ - (substitute* "setup.py" - (("==") ">=")))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "python" "-m" "unittest" - "discover" "-p" "*tests.py" "mkdocs" - "--top-level-directory" "."))))))) + (list + #:test-backend #~'unittest + #:test-flags + #~(list "discover" "-p" "*tests.py" "mkdocs" "--top-level-directory" ".") + #:phases + #~(modify-phases %standard-phases + ;; Requirements refer to a specific version of dependencies, + ;; which are too old. So we patch to refer to any later version. + (add-after 'unpack 'patch-requirements + (lambda _ + (substitute* "setup.py" + (("==") ">="))))))) + (native-inputs (list python-setuptools)) (propagated-inputs (list python-babel python-click @@ -3012,8 +3009,9 @@ that best match text queries.") python-watchdog)) (home-page "https://www.mkdocs.org") (synopsis "Project documentation with Markdown") - (description "MkDocs is a static site generator geared towards building -project documentation. Documentation source files are written in Markdown, and + (description + "MkDocs is a static site generator geared towards building project +documentation. Documentation source files are written in Markdown, and configured with a single YAML configuration file.") (license license:bsd-3)))