GNU bug report logs - #63628
[PATCH 1/2] gnu: python-plotly: Fix version.

Previous Next

Package: guix-patches;

Reported by: Vinicius Monego <monego <at> posteo.net>

Date: Sun, 21 May 2023 17:21:02 UTC

Severity: normal

Tags: patch

Done: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 63628 <at> debbugs.gnu.org (full text, mbox):

From: Vinicius Monego <monego <at> posteo.net>
To: 63628 <at> debbugs.gnu.org
Cc: Vinicius Monego <monego <at> posteo.net>
Subject: [PATCH v2 1/2] gnu: python-plotly: Fix version.
Date: Sat, 10 Jun 2023 02:25:10 +0000
* gnu/packages/graph.scm (python-plotly)[arguments]: In the fix-version phase,
substitute the correct version string.
---
The substitution in setup.py was fine, the problem was with the __version__ attribute. Both are correct now. I also added a comment about versioneer.

 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 <andreas <at> enge.fr>
 ;;; Copyright © 2020 Alexander Krotov <krotov <at> iitp.ru>
 ;;; Copyright © 2020 Pierre Langlois <pierre.langlos <at> gmx.com>
-;;; Copyright © 2021 Vinicius Monego <monego <at> posteo.net>
+;;; Copyright © 2021, 2023 Vinicius Monego <monego <at> posteo.net>
 ;;; Copyright © 2021 Alexandre Hannud Abdo <abdo <at> member.fsf.org>
 ;;; Copyright © 2021, 2022, 2023 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
 ;;; Copyright © 2022 Marius Bakke <marius <at> 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")))
-- 
2.34.1





This bug report was last modified 1 year and 328 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.