[PATCH] drm/msm: Fix gen_header.py for python earlier than v3.9

Jon Hunter jonathanh at nvidia.com
Thu May 30 13:17:45 UTC 2024


Abhinav,

On 08/05/2024 21:52, Jon Hunter wrote:
> 
> On 08/05/2024 17:46, Abhinav Kumar wrote:
>>
>>
>> On 5/8/2024 2:17 AM, Jon Hunter wrote:
>>> Building the kernel with python3 versions earlier than v3.9 fails 
>>> with ...
>>>
>>>   Traceback (most recent call last):
>>>     File "drivers/gpu/drm/msm/registers/gen_header.py", line 970, in 
>>> <module>
>>>       main()
>>>     File "drivers/gpu/drm/msm/registers/gen_header.py", line 951, in 
>>> main
>>>       parser.add_argument('--validate', 
>>> action=argparse.BooleanOptionalAction)
>>>   AttributeError: module 'argparse' has no attribute 
>>> 'BooleanOptionalAction'
>>>
>>> The argparse attribute 'BooleanOptionalAction' is only supported for
>>> python v3.9 and later. Fix support for earlier python3 versions by
>>> explicitly defining '--validate' and '--no-validate' arguments.
>>>
>>> Signed-off-by: Jon Hunter <jonathanh at nvidia.com>
>>> ---
>>>   drivers/gpu/drm/msm/registers/gen_header.py | 3 ++-
>>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>
>> Thanks for your patch, I had sent something similar y'day.
>>
>> If you are alright with 
>> https://patchwork.freedesktop.org/patch/593057/, we can use that one.
> 
> 
> Yes that's fine with me.


Any update on this? All our farm builders are unable to build either 
-next or mainline currently.

Jon

-- 
nvpublic


More information about the dri-devel mailing list