On Tue, Sep 12, 2023 at 01:17:21PM +0100, Andrew Cooper wrote:
> On 12/09/2023 12:50 pm, Marek Marczykowski-Górecki wrote:
> > On Tue, Sep 12, 2023 at 11:38:04AM +0100, Andrew Cooper wrote:
> >> On 11/09/2023 5:51 pm, Javi Merino wrote:
> >>> From: Marek Marczykowski-Górecki <[email protected]>
> >>>
> >>> Python distutils is deprecated and is going to be removed in Python
> >>> 3.12. The distutils.sysconfig is available as sysconfig module in
> >>> stdlib since Python 3.2, so use that directly.
> >>>
> >>> Signed-off-by: Marek Marczykowski-Górecki 
> >>> <[email protected]>
> >> This breaks Py2, doesn't it?
> > I was thinking that too, but "sysconfig" module seems to be in Python
> > 2.7 too.

Yes, I forgot to say it.  I tested this with python2 as well as python3.  I did:

  PYTHON=$(which python) ./configure
  make -C tools/pygrub clean && make -C tools/pygrub
  make -C tools/python clean && make -C tools/python

with python being:

  $ python --version
  Python 2.7.18.6

I did the same test with just `./configure` and python3 being:

  $ python3 --version
  Python 3.12.0rc2

> Oh, so it is.  Lovely that the documentation says this...
> 
> It seems to have appeared in Py2.7 and 3.2 together. 
> https://docs.python.org/2.7/library/sysconfig.html
> 
> I notice that README currently says Py2.6.  We can definitely bump that
> to 2.7, and take this patch as-is.

Marek had a patch that bumped the minimum version to 3.2[0] but I
dropped it from the series as we were going to keep the support for python2.

[0] 
https://lore.kernel.org/xen-devel/[email protected]/

I will bump the minimum version of python to 2.7 in the README.

Cheers,
Javi

Reply via email to