From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by sourceware.org (Postfix) with ESMTPS id C5CDD3858C27 for ; Sun, 19 Dec 2021 04:45:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C5CDD3858C27 Received: by mail-wm1-x32d.google.com with SMTP id c66so830724wma.5 for ; Sat, 18 Dec 2021 20:45:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=5hQZjgxL4MRxQ+UZUEkmWx2ORU10RmhqBciQr7WY4Fc=; b=3M3LUbp5dhZslemaZsp9tuygU9vmhGm7PUqOBXWtBnpzOzubUWG0Qw10aQGeFculhw 4kbKgz1EWzzrN5OP7R2zX3r7G9fYgVataBlLDg5WPiRxz1JaVBN8OelVpwbqYiEiKdgT 2InXaU3Ga9hiVPx9KYwgIJJhAI+MjHX1G64pPJ/vMjwEtIzgt7W71WZrbLD1za9aYYXB SEeKQ9UtRpkHvvP0aBk//l+STKcCvQoTOJCJp8aHZIUPk4g56YK3NEkbbJVCsyfZ5SMx J3AFfusJJsgAmK+vQm3lwcD7+APrge++44nAUpLkhfRkgO8SUTXd8nrUTeFzk6WX+tkV R78w== X-Gm-Message-State: AOAM530/v3YCWImCQ6KZu97YEoZqVmteJcLbWBOZLvYT4uCD87DFa11N izXZWC2uicHXco6jAUT2gPUukE5L6Bfa X-Google-Smtp-Source: ABdhPJzr4JnWQtFne88M9qywC+D9gIueUBarpBwI2VhoKdML6rOGn+R8PT0zxawzQaT+tTOBbFRFBg== X-Received: by 2002:a05:600c:3d06:: with SMTP id bh6mr9141775wmb.129.1639889141875; Sat, 18 Dec 2021 20:45:41 -0800 (PST) Received: from takamaka.home (lfbn-reu-1-492-16.w92-130.abo.wanadoo.fr. [92.130.80.16]) by smtp.gmail.com with ESMTPSA id c11sm9743429wmq.48.2021.12.18.20.45.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Dec 2021 20:45:41 -0800 (PST) Received: by takamaka.home (Postfix, from userid 1000) id 06EA8A49FA; Sun, 19 Dec 2021 08:45:39 +0400 (+04) Date: Sun, 19 Dec 2021 08:45:39 +0400 From: Joel Brobecker To: overseers@sourceware.org Cc: Joel Brobecker , Joseph Myers , Carlos O'Donell , Corinna Vinschen , Ivo Raisr Subject: Re: transition git-hooks on sourceware.org to Python 3.x Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: overseers@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Overseers mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Dec 2021 04:45:44 -0000 Quick update: I have set up the hooks wrappers at the following location: /home/gdbadmin/shared-scripts/git-hooks-wrapper For the record, here is the list of commands I used to create it: # Clone the git-hooks-wrapper scrips $ mkdir shared-scripts $ cd shared-scripts/ $ git clone $HOME/GDBADMIN-BARE-REPOS/git-hooks-wrapper/ $ cd git-hooks-wrapper/ # Add a Python 3.9 install, and then the venv for the wrappers: $ tar xf ~/brobecke/py3-git-hooks/python3.9-3.9.7-x86_64-linux-bin.tar.gz $ mv python3.9-3.9.7-x86_64-linux-bin/ python-3.9.7 $ export PATH=`pwd`/python-3.9.7/bin:$PATH $ python3 -m venv python3-for-git-hooks $ . ./python3-for-git-hooks/bin/activate $ python3 -m pip install pip --upgrade $ python3 -m pip install black e3-core flake8 pre-commit \ pytest pytest-cov pytest-xdist # Clone the git-hooks, and run the validation test to make sure # the Python venv has everything the git-hooks need (note that # this doesn't include the wrappers in the testing, unfortunately). # # I might look at enhancing the testsuite to include the use of # those wrappers instead of the hooks themselves, at some point, # but it's a bit of work, so only if we find the regular need to # test the wrappers. $ git clone https://github.com/adacore/git-hooks $ cd git-hooks/testsuite/ $ ./run-validation-tests My plan is to transition the binutils-gdb repository to it on Monday morning (European timezone). To do so, what I will do is: $ /git/binutils-gdb.git $ mv hooks{,.legacy-python2} \ && ln -s /home/gdbadmin/shared-scripts/git-hooks-wrapper/hooks hooks I'll monitor the hooks behavior throughout the end of the year, and if all goes well, I suggest other projects who are ready (after reviewing their python scripts used by their project's config) do the same. I can provide assistance towards the transition, if you'd like. -- Joel