Hi Jano,

 

Here is the PR: https://gitlab.com/libvirt/libvirt-python/-/merge_requests/151

 

Thank you,

Ariel

-------- Original Message --------
Subject: Re: [PATCH 1/3] Makefile: `make check` now computes env variable on the fly
Date: Tuesday, August 06, 2024 13:59 CEST
From: "Ariel Otilibili-Anieli" <Ariel.Otilibili-Anieli@eurecom.fr>
To: Ján Tomko <jtomko@redhat.com>
CC: devel@lists.libvirt.org

References: <20240805175423.773603-1-otilibil@eurecom.fr> <20240805175423.773603-2-otilibil@eurecom.fr> 



 

Hi Jano,

On Tuesday, August 06, 2024 13:00 CEST, Ján Tomko <jtomko@redhat.com> wrote:

 

For repos other than the main 'libvirt' repo, we use merge requests on
GitLab.

I'll address all your feedback in a PR, later in the day. I used patches because the guidelines advise that (https://libvirt.org/hacking.html)

On a Monday in 2024, Ariel Otilibili wrote:
>* env variable used to be Python3.6
>* Python3.6 is end of life since December 2021 [1].
>
>[1] https://devguide.python.org/versions/
>
>Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
>---
> Makefile | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
>diff --git a/Makefile b/Makefile
>index b08e2bd..1cab66c 100644
>--- a/Makefile
>+++ b/Makefile
>@@ -1,6 +1,7 @@
> # Shim wrapper around setup.py to allow for familiar build targets
>
> PYTHON ?= python
>+VERSION := $(shell $(PYTHON) -V | perl -nE 'print "$$1$$2" if /\s(\d+)\.(\d+)/')
>

Please, no Makefile-escaped perl. Python should be able to do it too:
python -c 'import sys; print("{}{}".format(sys.version_info.major, sys.version_info.minor))'

Will change it; I forgot I came across this guideline, https://libvirt.org/programming-languages.html

> all:
> $(PYTHON) -m build
>@@ -12,7 +13,7 @@ clean:
> rm -rf build/ dist/
>
> check: all
>- tox -e py36
>+ tox -e py$(VERSION)

If I understand correctly, the point of tox is to run the test suite
against different Python versions.

Having 'py36' hardcoded here made sure it worked against that particular
version even if the user has a different version, but I do not
understand the benefit of running it against the current version (as
opposed to just running pytest directly).

My point was to update the version used in this rule; therefore I supposed, if one version were to be used, the latest of the user would make sense. For all the versions used by tox, this patch addresses particularly that: https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/message/VWW7BKHBYSA2PDOMAULKWQPZKELAAPTZ/

 

Ariel

Jano

>
> test: all
> tox
>-- 
>2.45.2
>