diff mbox series

[bug#50628,003/154] gnu: Add python-xlwt.

Message ID 47e40527c41e95b2ce1ab4d74129abf5c0325de2.1631832504.git.h.goebel@crazy-compilers.com
State Accepted
Headers show
Series Add 146 Tryton modules and some dependencies | expand

Checks

Context Check Description
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

Hartmut Goebel Sept. 16, 2021, 10:52 p.m. UTC
* gnu/packages/python-xyz.scm (python-xlwt): New variable.
---
 gnu/packages/python-xyz.scm | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

Comments

M Sept. 17, 2021, 12:35 p.m. UTC | #1
Hartmut Goebel schreef op vr 17-09-2021 om 00:52 [+0200]:
> +(define-public python-xlwt
> +  (package
> +    (name "python-xlwt")
> +    (version "1.3.0")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (pypi-uri "xlwt" version))
> +       (sha256
> +        (base32 "123c2pdamshkq75wwvck8fq0cjq1843xd3x9qaiz2a4vg9qi56f5"))))
> +    (build-system python-build-system)
> +    (arguments
> +     `(#:phases
> +       (modify-phases %standard-phases
> +         (replace 'check
> +           (lambda _
> +             (setenv "PYTHONPATH"
> +                     (string-append (getcwd) "/build/lib:"
> +                                    (getenv "PYTHONPATH")))
> +             (invoke "nosetests" "-v"))))))

Use (lambda* (#:key tests? #:allow-other-keys) (when tests? (setenv ...) (invoke ...)))
to let "guix build python-xlwt --without-tests=python-xlwt" work.  This would
be detected by "guix lint -c optional-tests" I think.

Greetings,
Maxime
M Sept. 17, 2021, 2:08 p.m. UTC | #2
Hartmut Goebel schreef op vr 17-09-2021 om 00:52 [+0200]:
> +(define-public python-xlwt
> [...]
> +    (description "@code{xlwt} is a library for writing data and formatting
> +information to older Excel files (ie: .xls).  The package itself is pure

In my experience, 'i.e.' is more ‘standard’ and common than ie, for some value
of ‘standard’ (English doesn't really have a standard but rather a lot of
(sometimes regional) conventions ...).

Greetings,
Maxime.
diff mbox series

Patch

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index b4f6f67ef2..23a76d7727 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -10368,6 +10368,36 @@  Unicode-aware.  It is not intended as an end-user tool.")
 (define-public python2-xlrd
   (package-with-python2 python-xlrd))
 
+(define-public python-xlwt
+  (package
+    (name "python-xlwt")
+    (version "1.3.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "xlwt" version))
+       (sha256
+        (base32 "123c2pdamshkq75wwvck8fq0cjq1843xd3x9qaiz2a4vg9qi56f5"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda _
+             (setenv "PYTHONPATH"
+                     (string-append (getcwd) "/build/lib:"
+                                    (getenv "PYTHONPATH")))
+             (invoke "nosetests" "-v"))))))
+    (native-inputs
+     `(("nose" ,python-nose)))
+    (home-page "http://www.python-excel.org/")
+    (synopsis "Library for creating spreadsheet Excel files")
+    (description "@code{xlwt} is a library for writing data and formatting
+information to older Excel files (ie: .xls).  The package itself is pure
+Python with no dependencies on modules or packages outside the standard Python
+distribution.  It is not intended as an end-user tool.")
+    (license license:bsd-3)))
+
 (define-public python-immutables
   (package
     (name "python-immutables")