diff mbox series

[bug#44786] gnu: Add python-xlsxwriter.

Message ID 20201122024007.49460-1-monego@posteo.net
State Accepted
Headers show
Series [bug#44786] gnu: Add python-xlsxwriter. | expand

Checks

Context Check Description
cbaines/submitting builds success
cbaines/submitting builds success
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Vinicius Monego Nov. 22, 2020, 2:40 a.m. UTC
* gnu/packages/python-xyz.scm (python-xlsxwriter): New variable.
---
 gnu/packages/python-xyz.scm | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

Comments

Nicolas Goaziou Nov. 24, 2020, 12:55 p.m. UTC | #1
Hello,

Vinicius Monego <monego@posteo.net> writes:

> * gnu/packages/python-xyz.scm (python-xlsxwriter): New variable.

Thank you.

> +       ;; There are no tests in the PyPI tarball.
> +       (method git-fetch)

Is this the sole reason to not use PyPI here? If that's the case,
I wonder if it's worth reconsidering, because using PyPI makes updates
easier.

WDYT?

Regards,
Vinicius Monego Nov. 24, 2020, 9:25 p.m. UTC | #2
Hello,

Nicolas Goaziou writes:

> Hello,
>
> Vinicius Monego <monego@posteo.net> writes:
>
>> * gnu/packages/python-xyz.scm (python-xlsxwriter): New variable.
>
> Thank you.
>
>> +       ;; There are no tests in the PyPI tarball.
>> +       (method git-fetch)
>
> Is this the sole reason to not use PyPI here? If that's the case,
> I wonder if it's worth reconsidering, because using PyPI makes updates
> easier.
>
> WDYT?

That is the sole reason. I prefer to enable tests because Python lacks
setup-time checking. Without tests, the build would succeed even if core
dependencies are unmet.

How does PyPI make updates easier, though? Refreshing works on GitHub.
Efraim Flashner Nov. 25, 2020, 7:37 a.m. UTC | #3
On Tue, Nov 24, 2020 at 01:55:30PM +0100, Nicolas Goaziou wrote:
> Hello,
> 
> Vinicius Monego <monego@posteo.net> writes:
> 
> > * gnu/packages/python-xyz.scm (python-xlsxwriter): New variable.
> 
> Thank you.
> 
> > +       ;; There are no tests in the PyPI tarball.
> > +       (method git-fetch)
> 
> Is this the sole reason to not use PyPI here? If that's the case,
> I wonder if it's worth reconsidering, because using PyPI makes updates
> easier.
> 
> WDYT?
> 

It is standard for us to use a git checkout when the pypi release
doesn't have the tests packaged. It's not uncommon for python packages
to build correctly but fail to run, and the test suite almost always
catches those.
Nicolas Goaziou Nov. 26, 2020, 1:48 p.m. UTC | #4
Hello,

Efraim Flashner <efraim@flashner.co.il> writes:

> It is standard for us to use a git checkout when the pypi release
> doesn't have the tests packaged.

I had not heard about this standard before. Considering many Python
packages are imported through PyPI, I genuinely wonder how common this
custom is, tho.

Fair enough. I applied the patch. Thank you!

Regards,
diff mbox series

Patch

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 32235c22a1..0d53797a36 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -5851,6 +5851,28 @@  a front-end for C compilers or analysis tools.")
 (define-public python2-pycparser
   (package-with-python2 python-pycparser))
 
+(define-public python-xlsxwriter
+  (package
+    (name "python-xlsxwriter")
+    (version "1.3.7")
+    (source
+     (origin
+       ;; There are no tests in the PyPI tarball.
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/jmcnamara/XlsxWriter")
+             (commit (string-append "RELEASE_" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1qg40r2mwrqfmhaxnary1cfgi0dwwazp5qga7c9p2cdji2v0x5rm"))))
+    (build-system python-build-system)
+    (home-page "https://github.com/jmcnamara/XlsxWriter")
+    (synopsis "Python module for creating Excel XLSX files")
+    (description
+     "XlsxWriter is a Python module that can be used to write text, numbers,
+formulas and hyperlinks to multiple worksheets in an Excel 2007+ XLSX file.")
+    (license license:bsd-2)))
+
 (define-public python-pywavelets
   (package
     (name "python-pywavelets")