gnu: python-openapi-spec-validator: Use pyproject-build-system.

* gnu/packages/python-web.scm (python-openapi-spec-validator)[build-system]:
Set to PYPROJECT-BUILD-SYSTEM.
[arguments]: Add #:test-flags.  Remove obsolete phases.
[native-inputs]: Remove PYTHON-PYPA-BUILD.
This commit is contained in:
Marius Bakke 2022-10-21 00:15:23 +02:00
parent 3c685772de
commit 5e17453f18
No known key found for this signature in database
GPG key ID: A2A06DF2A33A54FA

View file

@ -1643,33 +1643,19 @@ (define-public python-openapi-spec-validator
(sha256 (sha256
(base32 (base32
"1q09sjh4hsc0c8yqbd97h5mp6rwh427y6zyn8kv8wljk6sa0fs4q")))) "1q09sjh4hsc0c8yqbd97h5mp6rwh427y6zyn8kv8wljk6sa0fs4q"))))
(build-system python-build-system) (build-system pyproject-build-system)
(arguments (arguments
(list (list
;; The example tests attempt to fetch resources from the Internet
;; (see: https://github.com/p1c2u/openapi-spec-validator/issues/151).
#:test-flags #~'("-vv" "-k" "not Example and not Exampe")
#:phases #:phases
#~(modify-phases %standard-phases #~(modify-phases %standard-phases
(add-after 'unpack 'remove-coverage-pytest-options (add-after 'unpack 'remove-coverage-pytest-options
(lambda _ (lambda _
(substitute* "pyproject.toml" (substitute* "pyproject.toml"
(("^--cov.*") "")))) (("^--cov.*") "")))))))
;; XXX: PEP 517 manual build copied from python-isort. (native-inputs (list python-poetry-core python-pytest))
(replace 'build
(lambda _
(invoke "python" "-m" "build" "--wheel" "--no-isolation" ".")))
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
(invoke "pytest" "-vv"
;; The example tests attempt to fetch resources from
;; the Internet (see:
;; https://github.com/p1c2u/openapi-spec-validator/issues/151).
"-k" "not Example and not Exampe"))))
(replace 'install
(lambda _
(let ((whl (car (find-files "dist" "\\.whl$"))))
(invoke "pip" "--no-cache-dir" "--no-input"
"install" "--no-deps" "--prefix" #$output whl)))))))
(native-inputs (list python-poetry-core python-pypa-build python-pytest))
(propagated-inputs (propagated-inputs
(list python-jsonschema (list python-jsonschema
python-openapi-schema-validator python-openapi-schema-validator