[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
111/474: gnu: python-graphql-core: Enable tests.
From: |
guix-commits |
Subject: |
111/474: gnu: python-graphql-core: Enable tests. |
Date: |
Sat, 30 Nov 2024 18:20:01 -0500 (EST) |
sharlatan pushed a commit to branch python-team
in repository guix.
commit 5551ee275e8c28a76eb4d069e9ab8b3e0d6ecd07
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Wed May 8 10:03:43 2024 +0200
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
---
gnu/packages/python-xyz.scm | 43 ++++++++++++++++++++++++++++++++-----------
1 file changed, 32 insertions(+), 11 deletions(-)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index cbb9d766ad..b6f8494778 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -23685,18 +23685,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")
- 256/474: gnu: python-defusedxml: Update to 0.7.1., (continued)
- 256/474: gnu: python-defusedxml: Update to 0.7.1., guix-commits, 2024/11/30
- 248/474: gnu: Add python-pytest-html., guix-commits, 2024/11/30
- 276/474: gnu: python-quadpy: Adjust inputs., guix-commits, 2024/11/30
- 288/474: gnu: Remove python-poetry-core-1.0., guix-commits, 2024/11/30
- 293/474: gnu: Remove python-pyproject-metadata-0.7., guix-commits, 2024/11/30
- 320/474: gnu: python-py: Improve package style., guix-commits, 2024/11/30
- 59/474: gnu: python-jinja2: Add setuptools and wheel., guix-commits, 2024/11/30
- 72/474: gnu: Add python-hatch-jupyter-builder., guix-commits, 2024/11/30
- 105/474: gnu: python-sparqlkernel: Patch install script., guix-commits, 2024/11/30
- 107/474: gnu: Add python-jsonschema-path., guix-commits, 2024/11/30
- 111/474: gnu: python-graphql-core: Enable tests.,
guix-commits <=
- 126/474: gnu: python-sphinx-4: Inherit from python-sphinx-5., guix-commits, 2024/11/30
- 158/474: gnu: python-scikit-rf: Fix tests., guix-commits, 2024/11/30
- 136/474: gnu: python-seaborn: Correct dependencies., guix-commits, 2024/11/30
- 142/474: gnu: python-http-ece: Update to 1.2.0., guix-commits, 2024/11/30
- 149/474: gnu: Add ghc-language-python., guix-commits, 2024/11/30
- 150/474: gnu: python-xcffib: Move to (gnu packages xorg)., guix-commits, 2024/11/30
- 222/474: gnu: python-urllib3: Update to 2.2.1., guix-commits, 2024/11/30
- 250/474: gnu: python-parse-type: Adjust inputs., guix-commits, 2024/11/30
- 259/474: gnu: ytcc: Fix build., guix-commits, 2024/11/30
- 249/474: gnu: python-cucumber-tag-expressions: Update to 6.1.1., guix-commits, 2024/11/30