ngz pushed a commit to branch master
in repository guix.
commit 925ef60b669c76f01a07782738b6a923da5fbfd5
Author: Vinicius Monego <[email protected]>
AuthorDate: Sun May 21 17:19:51 2023 +0000
gnu: python-plotly: Fix version.
* gnu/packages/graph.scm (python-plotly)[arguments]: In the fix-version
phase,
substitute the correct version string.
Signed-off-by: Nicolas Goaziou <[email protected]>
---
gnu/packages/graph.scm | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/gnu/packages/graph.scm b/gnu/packages/graph.scm
index 1091d3d56e..4f44d5b5f4 100644
--- a/gnu/packages/graph.scm
+++ b/gnu/packages/graph.scm
@@ -6,7 +6,7 @@
;;; Copyright © 2019 Andreas Enge <[email protected]>
;;; Copyright © 2020 Alexander Krotov <[email protected]>
;;; Copyright © 2020 Pierre Langlois <[email protected]>
-;;; Copyright © 2021 Vinicius Monego <[email protected]>
+;;; Copyright © 2021, 2023 Vinicius Monego <[email protected]>
;;; Copyright © 2021 Alexandre Hannud Abdo <[email protected]>
;;; Copyright © 2021, 2022, 2023 Maxim Cournoyer <[email protected]>
;;; Copyright © 2022 Marius Bakke <[email protected]>
@@ -238,11 +238,16 @@ lines.")
(lambda _
(setenv "SKIP_NPM" "T")))
(add-after 'unpack 'fix-version
- ;; Versioneer is useless when there is no git metadata.
+ ;; TODO: Versioneer in Guix gets its release version from the
+ ;; parent directory, but the plotly package is located inside a
+ ;; depth 3 subdirectory. Try to use versioneer if possible.
(lambda _
(substitute* "packages/python/plotly/setup.py"
(("version=versioneer.get_version\\(),")
- (format #f "version=~s," #$version)))))
+ (format #f "version=~s," #$version)))
+ (substitute* "packages/python/plotly/plotly/version.py"
+ (("__version__ = get_versions\\(\\)\\[\"version\"\\]")
+ (format #f "__version__ = ~s" #$version)))))
(add-after 'fix-version 'chdir
(lambda _
(chdir "packages/python/plotly")))