From 7d7a77c78811bf5d1f5e8e3c74dbdea7f8a10da8 Mon Sep 17 00:00:00 2001 From: Hartmut Goebel Date: Thu, 2 Oct 2025 21:39:48 +0200 Subject: [PATCH] gnu: Add python-elastic-transport. * gnu/packages/python-web.scm (python-elastic-transport): New variable. --- gnu/packages/python-web.scm | 59 ++++++++++++++++++++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 73a5541944cf2d601adfbfbe7fedf1073bee8046..dbfaeae33f9b0a48dde7ee3c2e8fd607d146371f 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -13,7 +13,7 @@ ;;; Copyright © 2014, 2015 Mark H Weaver ;;; Copyright © 2015 Cyril Roelandt ;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari -;;; Copyright © 2016, 2019, 2022 Hartmut Goebel +;;; Copyright © 2016, 2019, 2022, 2025 Hartmut Goebel ;;; Copyright © 2016–2021 Tobias Geerinckx-Rice ;;; Copyright © 2015, 2017 Ben Woodcroft ;;; Copyright © 2015, 2016 Christine Lemmer-Webber @@ -7432,6 +7432,63 @@ jspacker or CSS tidy. It also supports URL rewriting in CSS files.") (description "Python port of the YUI CSS Compressor.") (license (list license:expat license:bsd-3)))) +(define-public python-elastic-transport + (package + (name "python-elastic-transport") + (version "9.1.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "elastic_transport" version)) + (sha256 + (base32 "0g879z8rqrfbwkxsm6xcycjha1swl7gdgs6m0y0j1zmh4m5f940m")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags + ;; Deselect failing tests (mostly due to network not reachable) + #~(list "-k" + (string-append + "not .badssl.com" + " and not test_assert_fingerprint_in_cert_chain_failure")) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'fix-pytest-config + (lambda _ + ;; Drop test coverage requirements. + (substitute* "setup.cfg" + (("--cov(-[^ ]*)?=[^ ]*") "\n"))))))) + (propagated-inputs (list python-certifi python-urllib3)) + (native-inputs (list nss-certs-for-test + python-aiohttp + ;; python-furo + python-httpx + python-opentelemetry-api + python-opentelemetry-sdk + python-orjson + python-pytest + python-pytest-asyncio + ;; python-pytest-cov + python-pytest-httpbin + python-pytest-httpserver + python-pytest-mock + python-requests + python-respx ;test + python-setuptools + ;; python-sphinx + ;; python-sphinx-autodoc-typehints + python-trustme + python-wheel)) + (home-page "https://github.com/elastic/elastic-transport-python") + (synopsis "Common library for Python Elastic client libraries") + (description + "This library was lifted from @code{elasticsearch-py} and then transformed to +be used across all Elastic services rather than only Elasticsearch. It +provides transport classes and utilities shared among Python Elastic client +libraries.") + ;; Apache-2.0 in setup.py and LICENSE file. + (license license:asl2.0))) + (define-public python-elasticsearch (package (name "python-elasticsearch")