diff options
author | Ricardo Wurmus <rekado@elephly.net> | 2024-05-08 10:03:43 +0200 |
---|---|---|
committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2024-12-13 20:18:43 +0000 |
commit | b43820782efb04cf6c4ee715fd5883997c098bd2 (patch) | |
tree | e5e2853ff762d0e9ee29cba5cff2c4721f9637c4 | |
parent | a10ee797b2424cf9c73c1ec0a5f351fee8e01eb6 (diff) | |
download | guix-b43820782efb04cf6c4ee715fd5883997c098bd2.tar.gz guix-b43820782efb04cf6c4ee715fd5883997c098bd2.zip |
gnu: python-graphql-core: Enable tests.
* gnu/packages/python-xyz.scm (python-graphql-core)[build-system]: Use
pyproject-build-system.
[arguments]: Enable tests; add phases 'use-poetry-core and 'patch-setup.py.
[native-inputs]: Add python-poetry-core, python-pytest, and
python-pytest-benchmark.
Change-Id: I519966ca0da38339981a17d830ecac786b36cfb3
-rw-r--r-- | gnu/packages/python-xyz.scm | 43 |
1 files changed, 32 insertions, 11 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 15af3ea8e4..42e12d6dd2 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -23769,18 +23769,39 @@ numbers, real numbers, mixed types and more, and comes with a shell command (sha256 (base32 "0fjv5w2wvgdr8gb27v241bavliipyir9fdz48rsgc3xapm644mn0")))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments - `(#:tests? #f ; Tests require the unpackaged pytest-benchmark. - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'patch-hardcoded-version - (lambda _ (substitute* - "setup.py" - (("'gevent==1.1rc1'") "'gevent'")) - #t))))) - (native-inputs - (list python-gevent python-mock python-pytest-mock)) + (list + #: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") + ;; Poetry does not like line breaks. + (("description = \"\"\"") + "description = \"GraphQL-core is a Python port of GraphQL.js.\"\n") + (("^GraphQL-core is a Python.*") "") + (("^ the JavaScript reference.*") "")))) + (add-after 'unpack 'patch-setup.py + (lambda _ + (substitute* "setup.py" + ;; Relax hardcoded version + (("'gevent==1.1rc1'") "'gevent'") + ;; Poetry complains about this line break. + (("a port of GraphQL.js,\"") + (string-append "a port of GraphQL.js, " + "the JavaScript reference implementation for GraphQL.")) + ((" \" the JavaScript reference.*") ""))))))) + (native-inputs + (list python-gevent + python-mock + python-poetry-core + python-pytest + python-pytest-benchmark + python-pytest-mock)) (propagated-inputs (list python-promise python-six)) (home-page "https://github.com/graphql-python/graphql-core") |