From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id MIKmH4QOFl9yGQAA0tVLHw (envelope-from ) for ; Mon, 20 Jul 2020 21:37:08 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id CAGkG4QOFl/abgAA1q6Kng (envelope-from ) for ; Mon, 20 Jul 2020 21:37:08 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id B8ED59400C3 for ; Mon, 20 Jul 2020 21:37:07 +0000 (UTC) Received: from localhost ([::1]:48560 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jxdT6-0004Eb-VC for larch@yhetil.org; Mon, 20 Jul 2020 17:37:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50638) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jxdT4-0004ET-1y for guix-patches@gnu.org; Mon, 20 Jul 2020 17:37:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53235) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jxdT3-0004l2-P5 for guix-patches@gnu.org; Mon, 20 Jul 2020 17:37:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jxdT3-00058E-MJ for guix-patches@gnu.org; Mon, 20 Jul 2020 17:37:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#42087] [PATCH 6/6] gnu: Add python-pre-commit. Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 20 Jul 2020 21:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42087 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Vinicius Monego , 42087@debbugs.gnu.org Cc: Vinicius Monego Received: via spool by 42087-submit@debbugs.gnu.org id=B42087.159528101919718 (code B ref 42087); Mon, 20 Jul 2020 21:37:01 +0000 Received: (at 42087) by debbugs.gnu.org; 20 Jul 2020 21:36:59 +0000 Received: from localhost ([127.0.0.1]:36548 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jxdT1-00057y-25 for submit@debbugs.gnu.org; Mon, 20 Jul 2020 17:36:59 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36806) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jxdSy-00057l-Ok for 42087@debbugs.gnu.org; Mon, 20 Jul 2020 17:36:57 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:41951) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jxdSs-0004kT-U3; Mon, 20 Jul 2020 17:36:50 -0400 Received: from 84-52-226.102.3p.ntebredband.no ([84.52.226.102]:58148 helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jxdSs-0005fJ-Ct; Mon, 20 Jul 2020 17:36:50 -0400 From: Marius Bakke In-Reply-To: <20200627154645.64264-6-monego@posteo.net> References: <20200627154645.64264-1-monego@posteo.net> <20200627154645.64264-6-monego@posteo.net> Date: Mon, 20 Jul 2020 23:36:41 +0200 Message-ID: <87o8o9hnrq.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -3.3 (---) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: -0.61 X-TUID: IbfSkbO8y/xm --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Vinicius Monego writes: > * gnu/packages/python-xyz.scm (python-pre-commit): New variable. [...] =20=20 > +(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 >=3D 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 hook= s. 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. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl8WDmkACgkQoqBt8qM6 VPp8PwgAkqQWqUdEDgFvQtFDc3oNMlRPFKPghhG8Tjx8uKkPEfANECLq3PIxy+5G O93fzO1/B/5zEynv/N3teIJkLfcQLe8C1SSQtNlJsN/dRRh5uULGiBs6cSZpH7f5 5pRfA2LXuM28NI8w9fppoPhLoZHWUsbnI38MZgvf+YlP9HunEcoJRnQQACaDwKdR iRk+DUlSQbmLp+C+aIzsc+ie8eykZoWjdBPJdFXvnpViQulkYtmFKs/xijCxtJpV FN8D70UssPHIgScXsRbJUUB5B1uXkXvEYciYkRPg7WPGsaRUyrYOPfuqH8w7hjiH DnoGbqTUoQmxsKROk9cGJpy+UK+7iw== =d+5M -----END PGP SIGNATURE----- --=-=-=--