Skip to content

Add support for windows apps python

Current method of python version detection are relying on executable version information. However windows apps python (https://www.microsoft.com/en-us/p/python-39/9p7qfqmjrfp7) does not have this information.

PS> Get-Command python

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Application     python.exe                                         0.0.0.0    C:\Users\Arutama\AppData\Local\Microsoft\WindowsApps\python.exe

This changes add fallback detection using python --version and compare it to match the minimum python version.

Also minor changes on minimum python version to explicitly use string (inside quotes), to avoid problem when we change minimum version in the future. Number such as 3.10 are not working properly without quotes.

PS> [version]$ver = '3.10'
PS> $ver

Major  Minor  Build  Revision
-----  -----  -----  --------
3      10     -1     -1


PS> [version]$ver = 3.10
PS> $ver

Major  Minor  Build  Revision
-----  -----  -----  --------
3      1      -1     -1

Merge request reports