Python Versions
wenv
allows to handle Python versions for configuration purposes.
- wenv.get_available_python_builds(parallel=8)
Queries
python.org
for Windows Embedded Builds.- Parameters
parallel (
int
) – Number of parallel queries topython.org
.- Return type
List
[PythonVersion
]- Returns
All available Windows Embedded Builds of CPython 3.
- wenv.get_latest_python_build(arch, major, minor, builds=None)
Find the latest build of a given Python major and minor version for a given architecture. Returns
None
if none can be found.- Parameters
arch (
str
) – Build architecture.major (
int
) – Python major version.minor (
int
) – Python minor version.builds (
Optional
[List
[PythonVersion
]]) – A list ofwenv.PythonVersion
objects. If left empty,python.org
will be queried.
- Return type
Optional
[PythonVersion
]- Returns
A
wenv.PythonVersion
object orNone
.
- class wenv.PythonVersion(arch, major, minor, maintenance, build='stable')
Parse, compare and export Python versions. Immutable.
- Parameters
arch (
str
) – Build architecture. Can bewin32
,win64
orarm64
.major (
int
) – Python major version, i.e.X
fromX.0.0
.minor (
int
) – Python minor version, i.e.X
from0.X.0
.maintenance (
int
) – Python maintenance version, i.e.X
from0.0.X
.build (
str
) – Type of build, e.g.aX
,bX
,rcX
, etc. If left empty or set tostable
, the build is considered stable.
- __eq__(other)
Equality operator.
- Parameters
other (
Any
) –- Return type
Union
[bool
,NotImplementedType
]
- __gt__(other)
Greater than operator.
- Parameters
other (
Any
) –- Return type
Union
[bool
,NotImplementedType
]
- __lt__(other)
Lesser than operator.
- Parameters
other (
Any
) –- Return type
Union
[bool
,NotImplementedType
]
- __repr__()
Converts version to interactive string representation.
- Return type
str
- __str__()
Converts version to string.
- Return type
str
- property arch: str
Build architecture.
- Return type
str
- as_block()
- Return type
str
- Returns
“Block”, i.e. combination of major and minor version as string.
- as_config()
- Return type
str
- Returns
String for use in configuration.
- as_githubtag()
- Return type
str
- Returns
Github version tag
- as_url()
- Return type
str
- Returns
Download URL for Windows Embedded Build ZIP file.
- as_zipname()
- Return type
str
- Returns
Name of Windows Embedded Build ZIP file.
- property build: str
Type of build.
- Return type
str
- classmethod from_config(arch, version)
Parses version from configuration value.
- Parameters
arch (
str
) – Build architecture.version (
str
) – Full version string, including type of build.
- classmethod from_zipname(zip_name)
Parse version from Windows Embedded Build ZIP file name.
- Parameters
zip_name (
str
) – Name of file
- property maintenance: int
Python maintenance version.
- Return type
int
- property major: int
Python major version.
- Return type
int
- property minor: int
Python minor version.
- Return type
int