aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorSharlatan Hellseher <sharlatanus@gmail.com>2023-03-08 23:26:36 +0000
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2023-03-16 00:10:59 +0100
commit1c0056876ccabf5ad30007e7163ae94b8152e20c (patch)
tree5b2d3500bb7a7606a372d5efaf8f89c49908fa9a /gnu
parent0689a842710e5831d9de12964ec1fd38b360e022 (diff)
downloadguix-1c0056876ccabf5ad30007e7163ae94b8152e20c.tar.gz
guix-1c0056876ccabf5ad30007e7163ae94b8152e20c.zip
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>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/graph.scm34
1 files changed, 20 insertions, 14 deletions
diff --git a/gnu/packages/graph.scm b/gnu/packages/graph.scm
index 62a5a400d2..b719b1be42 100644
--- a/gnu/packages/graph.scm
+++ b/gnu/packages/graph.scm
@@ -230,24 +230,30 @@ lines.")
"0kc9v5ampq2paw6sls6zdchvqvis7b1z8xhdvlhz5xxdr1vj5xnn"))))
(build-system python-build-system)
(arguments
- `(#:phases
- (modify-phases %standard-phases
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
(add-before 'build 'skip-npm
;; npm is not packaged so build without it
(lambda _
(setenv "SKIP_NPM" "T")))
- (add-after 'unpack 'chdir
- (lambda _
- (chdir "packages/python/plotly")
- #t))
- (replace 'check
- (lambda* (#:key tests? #:allow-other-keys)
- (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")))))))
+ (add-after 'unpack 'fix-version
+ ;; Versioneer is useless when there is no git metadata.
+ (lambda _
+ (substitute* "packages/python/plotly/setup.py"
+ (("version=versioneer.get_version\\(),")
+ (format #f "version=~s," #$version)))))
+ (add-after 'fix-version 'chdir
+ (lambda _
+ (chdir "packages/python/plotly")))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (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
(list python-ipywidgets python-pytest python-xarray))
(propagated-inputs