From: Sharlatan Hellseher <sharlatanus@gmail.com>
To: 62061@debbugs.gnu.org
Cc: Sharlatan Hellseher <sharlatanus@gmail.com>
Subject: [bug#62061] [PATCH 2/3] gnu: python-plotly: Fix version detection.
Date: Wed, 8 Mar 2023 23:26:36 +0000 [thread overview]
Message-ID: <20230308232637.6788-2-sharlatanus@gmail.com> (raw)
In-Reply-To: <20230308232637.6788-1-sharlatanus@gmail.com>
* 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.
---
gnu/packages/graph.scm | 34 ++++++++++++++++++++--------------
1 file changed, 20 insertions(+), 14 deletions(-)
diff --git a/gnu/packages/graph.scm b/gnu/packages/graph.scm
index 104fe07b58..603f45ef10 100644
--- a/gnu/packages/graph.scm
+++ b/gnu/packages/graph.scm
@@ -230,24 +230,30 @@ (define-public python-plotly
"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
--
2.39.1
next prev parent reply other threads:[~2023-03-08 23:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-08 23:21 [bug#62061] [PATCH 0/3]: gnu: Add python-poliastro Sharlatan Hellseher
2023-03-08 23:26 ` [bug#62061] [PATCH 1/3] gnu: Add python-czml3 Sharlatan Hellseher
2023-03-08 23:26 ` Sharlatan Hellseher [this message]
2023-03-08 23:26 ` [bug#62061] [PATCH 3/3] gnu: Add python-poliastro Sharlatan Hellseher
2023-03-15 23:19 ` bug#62061: [PATCH 0/3]: " Nicolas Goaziou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230308232637.6788-2-sharlatanus@gmail.com \
--to=sharlatanus@gmail.com \
--cc=62061@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).