Subject: Re: [bug#49123] [PATCH 06/24] gnu: Add python-logbook.

From: Maxime Devos <[email-masked]>
Date: Mon, 19 Jul 2021 14:18:16 +0200

slg via Guix-patches via schreef op za 19-06-2021 om 22:07 [-0300]:
> * gnu/packages/python-xyz.scm (python-logbook): New variable.
> ---
>  gnu/packages/python-xyz.scm | 30 ++++++++++++++++++++++++++++++
>  1 file changed, 30 insertions(+)
> 
> diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
> index 6831e2365b..bb3997501b 100644
> --- a/gnu/packages/python-xyz.scm
> +++ b/gnu/packages/python-xyz.scm
> @@ -26034,3 +26034,33 @@ HTML cleaner in lxml to make the result both valid and safe.")
>  and MIME type checking the magic numbers signature of a file or buffer.  This
>  is a Python port from filetype Go package.")
>      (license license:x11)))
> +
> +(define-public python-logbook
> +  (package
> +    (name "python-logbook")
> +    (version "1.5.3")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (pypi-uri "Logbook" version))
> +       (sha256
> +        (base32
> +         "1s1gyfw621vid7qqvhddq6c3z2895ci4lq3g0r1swvpml2nm9x36"))))
> +    (build-system python-build-system) ;; TODO: fix native extension build
> +    ;; Fails with gcc trying to compile unexistent file 'logbook/_speedups.c'.
> +    ;; Apparently it is generated from logbook/_speedups.pyx, I do not know if
> +    ;; an extra build phase is needed to generate this file.
> +    (arguments
> +     `(#:tests? #f)) ;; Needs native extension, which for some reason will
> +                     ;; not be compiled.

It apparently is a file to be be processed by 'cython'.
See, e.g., python-cytoolz and python-pyclipper for how to use 'cython'.

> +    (propagated-inputs
> +     `(("python-jinja2" ,python-jinja2)
> +       ("python-sqlalchemy" ,python-sqlalchemy)
> +       ("python-redis" ,python-redis)
> +       ("python-pyzmq" ,python-pyzmq)
> +       ("python-execnet" ,python-execnet)
> +       ("python-brotli" ,python-brotli)))
> +    (home-page "https://logbook.readthedocs.io/en/stable")
> +    (synopsis "Python logging library")
> +    (description "An awesome logging implementation that is fun to use.")

From (guix)Synopses and descriptions:

‘Please avoid marketing phrases such as “world-leading”,
“industrial-strength”, and “next-generation”, and avoid superlatives
like “the most advanced”—they are not helpful to users looking for a
package and may even sound suspicious.  Instead, try to be factual,
mentioning use cases and features.’

'awesome' and 'is fun to use' is marketing, and not very informative.

> +    (license license:bsd-1)))

The file LICENSE isn't the 1-clause BSD.
Rather, it appears to be the 3-clause BSD, with ‘the name of the copyright holder’
removed.

Greetings,
Maxime.