4.6. Distribution Versions API¶
See also Shortcuts.
4.6.1. Variables¶
The corresponding *bash* environment names.
bash_map
The mapping of attributes to values.
attribute_map
4.6.2. PythonDist¶
See also Shortcuts.
4.6.2.1. Attributes¶
The tuple of Python identifiers:
category disttype dist distrel
Additional shortcuts prepared for direct processing:
hexrelease
In addition the optional, but strongly supported attributes. Controlled by the parameter forceall:
c_libc_version c_compiler c_compiler_version
4.6.2.2. Methods¶
[doc]
[source]
calculates and caches current resulting hex value
scans current local platform and replaces current attributes
4.6.2.3. Operators¶
The operators commonly operate on the hexrelease values. When these are not yet available, they will be created on the fly. Thus these operations are quite costly, so use the bublic attributes where possible. Anyhow, in cases where performance does not count, e.g. for offline tools, the operators provide a smart toolset.
operator
[doc]
[source]
S + x
S == x
S >= X
S > X
S &= X
int(S)
S
|
= xS <= x
S < x
S != x
S
|
xx & S
x
|
S
4.6.2.4. Iterators¶
The main task using the iterators is the automatic synchronization of the attributes with the hexrelease.
operator
[doc]
[source]
remarks
x = S.k
S.k = x
synchronises all dependencies, else raises excpetion
x = S[k]
S[k] = x
synchronises all dependencies, else raises excpetion
values(S)
yield list of tupels
S.keys()
yield list of attribute names
S.values()
yield list of attribute values
4.6.3. Resources¶
CPython [CPython]
CircuitPython [CircuitPython]
Cython [Cython]
Detect if python script is run from an ipython shell, or run from the command line [ARTICLESTACKOFLOWIPYTHON]
In Python how can one tell if a module comes from a C extension? [ARTICLESTACKOFLOWCEXT]
IPython [IPython]
IronPython [IronPython]
Jython [Jython]
MicroPython [MicroPython]
PEP407 - New release cycle and introducing long-term support versions [PEP407]
PEP421 - Adding sys.implementation - [PEP421]
PEP440 - Version Identification and Dependency Specification [PEP440]
PEP440 [PEP440] - section final releases [FINALRELEASE]
Performance of Python runtimes on a non-numeric scientific code [PYIMPPERFORM]
PyPy [PyPy]