1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-22 18:20:32 +02:00

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 <sharlatanus@gmail.com>
This commit is contained in:
Nicolas Graves
2025-10-03 15:30:53 +02:00
committed by Sharlatan Hellseher
parent 3033b10fae
commit 4c2599bdb0

View File

@@ -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)))