summaryrefslogtreecommitdiff
path: root/gnu/packages/python-xyz.scm
diff options
context:
space:
mode:
authorGiacomo Leidi <goodoldpaul@autistici.org>2024-01-14 15:13:53 +0100
committerLudovic Courtès <ludo@gnu.org>2024-01-28 22:50:49 +0100
commit4802adbbf09b87841522b006ea5d4d3af01c30ec (patch)
treeacf97f94f290e2e9bdc0f0ba1b9db1617f4f8cd7 /gnu/packages/python-xyz.scm
parentdde76db33fbdede6bf26821f8c21cca7df45e79e (diff)
gnu: dynaconf: Update to 3.2.4.
* gnu/packages/patches/dynaconf-unvendor-deps.patch: Update accordingly. * gnu/packages/python-xyz.scm (dynaconf): Update to 3.2.4; [source]<url>; https://github.com/rochacbruno/dynaconf now permanently redirects to https://github.com/dynaconf/dynaconf ; <snippet>: update unvendoring and lower coverage quality gate for unit tests; [build-system]: switch to pyproject-build-system; [arguments]<test-flags>: disable tests that require Click 7 instead of Click 8; <phases>: comply with #:test-flags argument from pyproject-build-system; [propagated-inputs]: add python-tomli. Change-Id: I96597ec39d7aa2d3c3c169147640de19eaefe0b4 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/packages/python-xyz.scm')
-rw-r--r--gnu/packages/python-xyz.scm39
1 files changed, 27 insertions, 12 deletions
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 <a@ajgrf.com>
;;; Copyright © 2019, 2020, 2021, 2022, 2023 Pierre Langlois <pierre.langlois@gmx.com>
;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
-;;; Copyright © 2019-2021, 2023 Giacomo Leidi <goodoldpaul@autistici.org>
+;;; Copyright © 2019-2021, 2023, 2024 Giacomo Leidi <goodoldpaul@autistici.org>
;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
;;; Copyright © 2019, 2020, 2021, 2022 Tanguy Le Carrour <tanguy@bioneland.org>
;;; Copyright © 2019, 2021-2023 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
@@ -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))