me
/
guix
Archived
1
0
Fork 0

gnu: python-plotly: Fix version detection.

* gnu/packages/graph.scm (python-plotly): Apply new package style.
[arguments]: Add new fix-version phase.
[arguments]{phases}: chdir phase, remove trailing #f from lambda.

Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr>
master
Sharlatan Hellseher 2023-03-08 23:26:36 +00:00 committed by Nicolas Goaziou
parent 0689a84271
commit 1c0056876c
No known key found for this signature in database
GPG Key ID: DA00B4F048E92F2D
1 changed files with 20 additions and 14 deletions

View File

@ -230,24 +230,30 @@ lines.")
"0kc9v5ampq2paw6sls6zdchvqvis7b1z8xhdvlhz5xxdr1vj5xnn")))) "0kc9v5ampq2paw6sls6zdchvqvis7b1z8xhdvlhz5xxdr1vj5xnn"))))
(build-system python-build-system) (build-system python-build-system)
(arguments (arguments
`(#:phases (list
(modify-phases %standard-phases #:phases
#~(modify-phases %standard-phases
(add-before 'build 'skip-npm (add-before 'build 'skip-npm
;; npm is not packaged so build without it ;; npm is not packaged so build without it
(lambda _ (lambda _
(setenv "SKIP_NPM" "T"))) (setenv "SKIP_NPM" "T")))
(add-after 'unpack 'chdir (add-after 'unpack 'fix-version
(lambda _ ;; Versioneer is useless when there is no git metadata.
(chdir "packages/python/plotly") (lambda _
#t)) (substitute* "packages/python/plotly/setup.py"
(replace 'check (("version=versioneer.get_version\\(),")
(lambda* (#:key tests? #:allow-other-keys) (format #f "version=~s," #$version)))))
(when tests? (add-after 'fix-version 'chdir
(invoke "pytest" "-x" "plotly/tests/test_core") (lambda _
(invoke "pytest" "-x" "plotly/tests/test_io") (chdir "packages/python/plotly")))
;; FIXME: Add optional dependencies and enable their tests. (replace 'check
;; (invoke "pytest" "-x" "plotly/tests/test_optional") (lambda* (#:key tests? #:allow-other-keys)
(invoke "pytest" "_plotly_utils/tests"))))))) (when tests?
(invoke "pytest" "-x" "plotly/tests/test_core")
(invoke "pytest" "-x" "plotly/tests/test_io")
;; FIXME: Add optional dependencies and enable their tests.
;; (invoke "pytest" "-x" "plotly/tests/test_optional")
(invoke "pytest" "_plotly_utils/tests")))))))
(native-inputs (native-inputs
(list python-ipywidgets python-pytest python-xarray)) (list python-ipywidgets python-pytest python-xarray))
(propagated-inputs (propagated-inputs