Subject: Re: bug#25834: [PATCH 1/7] gnu: Add python2-backports-shutil-get-terminal-size.

From: Marius Bakke <[email-masked]>
Date: Thu, 23 Feb 2017 14:21:30 +0100

Thomas Danckaert <[email-masked]> writes:

> From: Thomas Danckaert <[email-masked]>
>
> * gnu/packages/python.scm (python2-backports-shutil-get-terminal-size): New
>   variable.

[...]

> +(define-public python2-backports-shutil-get-terminal-size
> +  (package-with-python2

The "package-with-python" procedure expects to get a py3 equipped
package as argument. For python2-only packages, I prefer to have the
inputs explicitly set to the python2 variants.

> +   (package
> +     (name "python-backports-shutil-get-terminal-size")
               python2*

> +     (version "1.0.0")
> +     (source
> +      (origin
> +        (method url-fetch)
> +        (uri (string-append
> +              "https://pypi.python.org/packages/ec/9c/"
> +              "368086faa9c016efce5da3e0e13ba392c9db79e3ab740b763fe28620b18b/"
> +              "backports.shutil_get_terminal_size-" version ".tar.gz"))

Is it possible to use 'pypi-uri' here?

> +        (sha256
> +         (base32
> +          "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
> +     (build-system python-build-system)
> +     (home-page
> +      "https://github.com/chrippa/backports.shutil_get_terminal_size")
> +     (synopsis
> +      "Backport of Python 3.3's @code{shutil.get_terminal_size()}")

I don't think Texinfo syntax is supported in synopses. See e.g.

https://www.gnu.org/software/guix/packages/r.html#ruby-minitest-bonus-assertions

> +     (description
> +      "A backport of the get_terminal_size function from Python 3.3's shutil.
> +Unlike the original version it is written in pure Python rather than C, so it
> +might be a tiny bit slower.")

Here "get_terminal_size" and "shutil" would be clearer with an @code{}
wrapper IMO. Otherwise LGTM.

> +     (license license:expat))))
> +
>  (define-public python-waf
>    (package
>      (name "python-waf")
> -- 
> 2.11.1