From 4802adbbf09b87841522b006ea5d4d3af01c30ec Mon Sep 17 00:00:00 2001 From: Giacomo Leidi Date: Sun, 14 Jan 2024 15:13:53 +0100 Subject: gnu: dynaconf: Update to 3.2.4. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/patches/dynaconf-unvendor-deps.patch: Update accordingly. * gnu/packages/python-xyz.scm (dynaconf): Update to 3.2.4; [source]; https://github.com/rochacbruno/dynaconf now permanently redirects to https://github.com/dynaconf/dynaconf ; : update unvendoring and lower coverage quality gate for unit tests; [build-system]: switch to pyproject-build-system; [arguments]: disable tests that require Click 7 instead of Click 8; : comply with #:test-flags argument from pyproject-build-system; [propagated-inputs]: add python-tomli. Change-Id: I96597ec39d7aa2d3c3c169147640de19eaefe0b4 Signed-off-by: Ludovic Courtès --- gnu/packages/python-xyz.scm | 39 +++++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 12 deletions(-) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 6149807e77..87391b4806 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -63,7 +63,7 @@ ;;; Copyright © 2019, 2020 Alex Griffin ;;; Copyright © 2019, 2020, 2021, 2022, 2023 Pierre Langlois ;;; Copyright © 2019 Jacob MacDonald -;;; Copyright © 2019-2021, 2023 Giacomo Leidi +;;; Copyright © 2019-2021, 2023, 2024 Giacomo Leidi ;;; Copyright © 2019 Wiktor Żelazny ;;; Copyright © 2019, 2020, 2021, 2022 Tanguy Le Carrour ;;; Copyright © 2019, 2021-2023 Mădălin Ionel Patrașcu @@ -33162,30 +33162,40 @@ Python @code{set} interface.") (define-public dynaconf (package (name "dynaconf") - (version "3.1.7") + (version "3.2.4") (source (origin (method git-fetch) (uri (git-reference - (url "https://github.com/rochacbruno/dynaconf") + (url "https://github.com/dynaconf/dynaconf") (commit version))) (file-name (git-file-name name version)) (sha256 (base32 - "0pjyjsdzairpn5vq8nzddhxwxmr18grn272nj31wcy2ipwdl3c3h")) + "0fj2ffvzfvjf4d7f672h5x5fzq26f8hax9j3dfsix158fwm0212w")) (patches (search-patches "dynaconf-unvendor-deps.patch")) (modules '((guix build utils))) (snippet '(begin ;; Remove vendored dependencies (let ((unvendor '("click" "dotenv" "ruamel" "toml"))) (with-directory-excursion "dynaconf/vendor" - (for-each delete-file-recursively unvendor)) - (with-directory-excursion "dynaconf/vendor_src" - (for-each delete-file-recursively unvendor))))))) - (build-system python-build-system) + (for-each delete-file-recursively unvendor))) + ;; Lower coverage quality gate for unit tests + (substitute* ".coveragerc" + (("fail_under = 95") "fail_under = 50")))))) + (build-system pyproject-build-system) (arguments - `(#:phases + `(#:test-flags + '("-k" + ,(let ((click-tests '("test_negative_get" + "test_inspect_invalid_format"))) + ;; Disable integration tests + (string-append "not integration and not " + ;; These tests fail because we use Click 8.* instead of + ;; Click 7 + (string-join click-tests " and not ")))) + #:phases (modify-phases %standard-phases (add-after 'unpack 'patch-for-click-8 (lambda _ @@ -33193,14 +33203,19 @@ Python @code{set} interface.") (("click.get_os_args\\()") ;deprecated from Click 8.1+ "sys.argv[1:]")))) (replace 'check - (lambda* (#:key tests? outputs #:allow-other-keys) + (lambda* (#:key tests? test-flags #:allow-other-keys) (when tests? ;; These tests depend on hvac and a live Vault process. (delete-file "tests/test_vault.py") - (invoke "make" "test_only"))))))) + (apply invoke + `("py.test" ,@test-flags "-v" + "--cov-config" ".coveragerc" + "--cov=dynaconf" + "-l" "--tb=short" + "--maxfail=1" "tests/")))))))) (propagated-inputs (list python-click python-configobj python-dotenv-0.13.0 - python-ruamel.yaml python-toml)) + python-ruamel.yaml python-toml python-tomli)) (native-inputs (list python-django python-flask python-pytest python-pytest-cov python-pytest-mock)) -- cgit v1.3