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 <mail@nicolasgoaziou.fr>
This commit is contained in:
Vinicius Monego 2023-05-21 17:19:51 +00:00 committed by Nicolas Goaziou
parent afab4dd869
commit 925ef60b66
No known key found for this signature in database
GPG key ID: DA00B4F048E92F2D

View file

@ -6,7 +6,7 @@
;;; Copyright © 2019 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2020 Alexander Krotov <krotov@iitp.ru>
;;; Copyright © 2020 Pierre Langlois <pierre.langlos@gmx.com>
;;; Copyright © 2021 Vinicius Monego <monego@posteo.net>
;;; Copyright © 2021, 2023 Vinicius Monego <monego@posteo.net>
;;; Copyright © 2021 Alexandre Hannud Abdo <abdo@member.fsf.org>
;;; Copyright © 2021, 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2022 Marius Bakke <marius@gnu.org>
@ -238,11 +238,16 @@ (define-public python-plotly
(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")))