[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [XEN PATCH v3 1/1] build: replace get-fields.sh by a python script
- To: Luca Fancellu <Luca.Fancellu@xxxxxxx>
- From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
- Date: Tue, 17 Jan 2023 16:55:39 +0000
- Authentication-results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
- Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
- Delivery-date: Tue, 17 Jan 2023 16:56:09 +0000
- Ironport-data: A9a23:SNXmAKlC9EM5CaJpe35kY9no5gy5JkRdPkR7XQ2eYbSJt1+Wr1Gzt xIXCj3VO/nYMGakco1yPY208kgFsJTWyN9lTwRpqCBmQyMWpZLJC+rCIxarNUt+DCFhoGFPt JxCN4aafKjYaleG+39B55C49SEUOZmgH+a6U6icf3grHmeIcQ954Tp7gek1n4V0ttawBgKJq LvartbWfVSowFaYCEpNg064gE4p7auaVA8w5ARkPqgS5QCGzRH5MbpETU2PByqgKmVrNrbSq 9brlNmR4m7f9hExPdKp+p6TnpoiG+O60aCm0xK6aoD66vRwjnVaPpUTbZLwXXx/mTSR9+2d/ f0W3XCGpaXFCYWX8AgVe0Ew/yiTpsSq8pefSZS0mZT7I0Er7xIAahihZa07FdRwxwp5PY1B3 cQgDitXRyCvvtiR27WlCe41vukcJ8a+aevzulk4pd3YJfMvQJSFSKTW/95Imjw3g6iiH96HO ZBfM2A2Kk2dPVsWYAx/5JEWxY9EglH2dSFYr1SE47I6+WHJwCR60aT3McqTcduPLSlQthfC9 zOWrjqkav0cHOKGmACEwl2Dvc6Mkyj8eroVNpuTytc/1TV/wURMUUZLBDNXu8KRrlO1UpRxI kof9y4qsIA77kntRd74NzWorXjBshMCVt54F+wh9BrL2qfS+xyeBGUPUnhGctNOnM08SCEu1 1SJt8j0HjEpu7qQIVqf67OVoDWaKSUTa2gYakcsVhAZ6tPupIUyiBPnTdt5FqOxyNrvFlnY3 DSivCU4wbIJgqY2O76TpA6dxWj2/96QE1Bzv1+MNo640u9nTLadQZfywGj31MxnN4GHDV7Yh FU7kMfLuYjiEqqxeDyxrPQlRe/2vKffamWD0TaDDLF6qW3zpifLkZR4pWgneRw3aptslSrBO he7hO9H2HNE0JJGh4dTapn5NcklxLOI+T/NBqGNNYomjnScmWa6EMBSia24hTqFfLAEy/1XB HtiWZ/E4YwmIapm1iGqYOwWzKUmwCszrUuKG8+gn0X7ierPPS/OIVvgDLdpRrlphJ5oXS2Pq 4oPXyd040g3vBLCjtn/rtdIcAFiwYkTDpHqsc1HHtNv0SI/cFzN/8T5mOt7E6Q8xvQ9qws91 i3lMqOu4Aal1CKvxMTjQiwLVY4Dqr4k9ChnZ3ZyZw33s5XhCK72hJoim1IMVeFP3IReITRcF JHpp+3o7ixzdwn6
- Ironport-hdrordr: A9a23:foVIpqvS79aAEWNCwURQ2egA7skDhtV00zEX/kB9WHVpm6yj+v xG/c5rsiMc7Qx6ZJhOo7+90cW7L080sKQFgrX5Xo3SODUO2lHJEGgK1+KLrwEIWReOlNK1vZ 0KT0EUMqyUMbEVt6fHCAnTKadd/DGEmprY+ts3GR1WPH9Xg6IL1XYJNu6CeHcGIjWvnfACZe ChDswsnUvYRV0nKv6VK1MiROb5q9jChPvdEGM7705O0nj3sduwgoSKaCSl4g==
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Tue, Jan 17, 2023 at 04:07:24PM +0000, Luca Fancellu wrote:
> > On 16 Jan 2023, at 18:10, Anthony PERARD <anthony.perard@xxxxxxxxxx> wrote:
> > diff --git a/xen/tools/compat-xlat-header.py
> > b/xen/tools/compat-xlat-header.py
> > new file mode 100644
> > index 0000000000..c1b361ac56
> > --- /dev/null
> > +++ b/xen/tools/compat-xlat-header.py
> > @@ -0,0 +1,468 @@
> > +#!/usr/bin/env python
>
> Would it make sense to start with python3 since it is a new script?
That shebang isn't even used as the script doesn't even have the
execution bit set. So why do you say that the script isn't python3? Not
really asking, just been pedantic :-)
Even if it's a new script, it isn't a new project. We can't depend on
brand new functionality from our dependencies. We need to be able to
build the hypervisor with old build toolchain / distribution.
Anyway, I did start by writing a python3 script in all its glory (or at
least some of the new part of the language that I know about), but I had
to rework it to be able to use it on older distribution. Our centos7
container in our GitLab CI seems to use python2.7.
So I had to stop using str.removeprefix() and I introduce some function
doing the same thing instead (so that works with older than python 3.9).
Then I had to stop using f-strings and use %-formatting instead.
Then use "m.groups()[0]" instead of "m[1]" where "m" is a match result
from re.match() and other.
And use the classing "from __future__ ..." preamble.
Cheers,
--
Anthony PERARD
|