guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#42087] [PATCH 6/6] gnu: Add python-pre-commit.


From: Marius Bakke
Subject: [bug#42087] [PATCH 6/6] gnu: Add python-pre-commit.
Date: Mon, 20 Jul 2020 23:36:41 +0200

Vinicius Monego <monego@posteo.net> writes:

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

[...]
  
> +(define-public python-pre-commit
> +  (package
> +    (name "python-pre-commit")
> +    (version "2.5.1")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (pypi-uri "pre_commit" version))
> +       (sha256
> +        (base32 "1ivl921kdk9wga2cix4j9ydvs3dryqaaayq496pzjmz2y3w3qins"))))
> +    (build-system python-build-system)
> +    (arguments
> +     `(#:tests? #f)) ;tests require python-tox >= 3.13

Do they really require Tox directly?  Tox is fairly redundant in Guix,
as all it does is create an isolated environment for running tests,
which Guix already does.  So the usual approach is to copy the command
for running tests out of tox.ini and run it directly in the check
phase.  Is that an option here?

> +    (propagated-inputs
> +     `(("python-cfgv" ,python-cfgv)
> +       ("python-identify" ,python-identify)
> +       ("python-nodeenv" ,python-nodeenv)
> +       ("python-pyyaml" ,python-pyyaml)
> +       ("python-toml" ,python-toml)
> +       ("python-virtualenv" ,python-virtualenv)))

Does this program produce a regular executable?  I.e. it's not intended
for use as a library?  In that case you can simply add these as regular
inputs, and the executable will be "wrapped" with the correct
PYTHONPATH.

Also, maybe we can omit the python- prefix here too, and perhaps place
it in version-control.scm?

> +    (home-page "https://pre-commit.com/";)
> +    (synopsis "Framework for managing and maintaining multi-language 
> pre-commit hooks")
> +    (description
> +     "Pre-commit is a multi-language package manager for pre-commit hooks.  
> You
> +specify a list of hooks you want and pre-commit manages the installation and
> +execution of any hook written in any language before every commit.")

Woow, a package manager for pre-commit hooks, amazing.  LGTM.  :-)

Can you send a v2 series?  By the way, great job at enabling tests for
the other packages.

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]