gnu: beancount: Enable tests.
* gnu/packages/finance.scm (beancount) [source]: Swap to git checkout, containing all required test data files. [build-system]: Swap to pyproject-build-system. [arguments] <#:phases>: Add 'build-extensions phase. [propagated-inputs]: Add python-auth2client. [native-inputs]: Add gnupg and python-pdfminer-six. Change-Id: Id0c725cae8cdc677ad0c3a0a75be6eea682eee05
This commit is contained in:
parent
4fd0c88dc6
commit
5ee3f3cec4
1 changed files with 28 additions and 8 deletions
|
@ -37,6 +37,7 @@
|
||||||
;;; Copyright © 2023 Foundation Devices, Inc. <hello@foundationdevices.com>
|
;;; Copyright © 2023 Foundation Devices, Inc. <hello@foundationdevices.com>
|
||||||
;;; Copyright © 2023 Attila Lendvai <attila@lendvai.name>
|
;;; Copyright © 2023 Attila Lendvai <attila@lendvai.name>
|
||||||
;;; Copyright © 2024 Saku Laesvuori <saku@laesvuori.fi>
|
;;; Copyright © 2024 Saku Laesvuori <saku@laesvuori.fi>
|
||||||
|
;;; Copyright © 2024 Sharlatan Hellseher <sharlatanus@gmail.com>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -1969,22 +1970,40 @@ that allows you to run services and through them access the Bitcoin Cash network
|
||||||
(version "2.3.6")
|
(version "2.3.6")
|
||||||
(source
|
(source
|
||||||
(origin
|
(origin
|
||||||
(method url-fetch)
|
(method git-fetch) ; no test data files in PyPI archive
|
||||||
(uri (pypi-uri "beancount" version))
|
(uri (git-reference
|
||||||
|
(url "https://github.com/beancount/beancount")
|
||||||
|
(commit version)))
|
||||||
|
(file-name (git-file-name name version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32 "0nj7sdh7wxc0hv8wxwqhw9v1zgx1sn4w92368ci2wzdmssz967w0"))
|
(base32 "1slxsjw29cyr2kbirdpijhpqspk55k38rpmk3zc02pr1wll62qsv"))
|
||||||
(patches (search-patches "beancount-disable-googleapis-fonts.patch"))))
|
(patches (search-patches "beancount-disable-googleapis-fonts.patch"))
|
||||||
(build-system python-build-system)
|
(modules '((guix build utils)))
|
||||||
|
(snippet
|
||||||
|
#~(begin
|
||||||
|
;; Remove broken experiments.
|
||||||
|
(delete-file-recursively "experiments")
|
||||||
|
;; Remove bundled packages.
|
||||||
|
(delete-file-recursively "third_party")))))
|
||||||
|
(build-system pyproject-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
(list
|
(list
|
||||||
#:tests? #f ; Says test is missing, not sure why
|
#:test-flags
|
||||||
|
#~(list "-k" (string-append
|
||||||
|
;; ModuleNotFoundError: No module named 'pytest'
|
||||||
|
"not test_parse_stdin"
|
||||||
|
;; AssertionError: 5 not greater than 20
|
||||||
|
" and not test_setup"))
|
||||||
#:phases
|
#:phases
|
||||||
#~(modify-phases %standard-phases
|
#~(modify-phases %standard-phases
|
||||||
(add-after 'unpack 'relax-requirements
|
(add-after 'unpack 'relax-requirements
|
||||||
(lambda _
|
(lambda _
|
||||||
(substitute* "setup.py"
|
(substitute* "setup.py"
|
||||||
;; Use compatible fork, and do not fail during sanity check.
|
;; Use compatible fork, and do not fail during sanity check.
|
||||||
(("\"pdfminer2\",") "")))))))
|
(("\"pdfminer2\",") ""))))
|
||||||
|
(add-before 'check 'build-extensions
|
||||||
|
(lambda _
|
||||||
|
(invoke "python" "setup.py" "build_ext" "--inplace"))))))
|
||||||
(propagated-inputs
|
(propagated-inputs
|
||||||
(list python-beautifulsoup4
|
(list python-beautifulsoup4
|
||||||
python-bottle
|
python-bottle
|
||||||
|
@ -1994,10 +2013,11 @@ that allows you to run services and through them access the Bitcoin Cash network
|
||||||
python-google-auth-oauthlib
|
python-google-auth-oauthlib
|
||||||
python-lxml
|
python-lxml
|
||||||
python-magic
|
python-magic
|
||||||
|
python-oauth2client
|
||||||
python-ply
|
python-ply
|
||||||
python-requests))
|
python-requests))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(list python-pytest))
|
(list gnupg python-pdfminer-six python-pytest))
|
||||||
(home-page "https://beancount.github.io/")
|
(home-page "https://beancount.github.io/")
|
||||||
(synopsis "Command-line double-entry accounting tool")
|
(synopsis "Command-line double-entry accounting tool")
|
||||||
(description
|
(description
|
||||||
|
|
Reference in a new issue