mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
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>
This commit is contained in:
parent
dde76db33f
commit
4802adbbf0
2 changed files with 108 additions and 103 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue