Age | Commit message (Collapse) | Author |
|
This is useful to distinguish between GIL and non-GIL builds.
Signed-off-by: Damien George <damien@micropython.org>
|
|
For a given MicroPython firmware/executable it can be sometimes important
to know how it was built, which variant/board configuration it came from.
This commit adds a new field `sys.implementation._build` that can help
identify the configuration that MicroPython was built with.
For now it's either:
* <VARIANT> for unix, webassembly and windows ports
* <BOARD>-<VARIANT> for microcontroller ports (the variant is optional)
In the future additional elements may be added to this string, separated by
a hyphen.
Resolves issue #16498.
Signed-off-by: Damien George <damien@micropython.org>
|
|
Signed-off-by: stijn <stijn@ignitron.net>
|
|
This work was funded through GitHub Sponsors.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
|
|
The field was renamed to _mpy in 59c5d4161120db28bc6cbc7653f2e7fdb4a87370
Signed-off-by: Damien George <damien@micropython.org>
|
|
This is consistent with the other 'micro' modules and allows implementing
additional features in Python via e.g. micropython-lib's sys.
Note this is a breaking change (not backwards compatible) for ports which
do not enable weak links, as "import sys" must now be replaced with
"import usys".
|
|
This commit adds a sys.implementation.mpy entry when the system supports
importing .mpy files. This entry is a 16-bit integer which encodes two
bytes of information from the header of .mpy files that are supported by
the system being run: the second and third bytes, .mpy version, and flags
and native architecture. This allows determining the supported .mpy file
dynamically by code, and also for the user to find it out by inspecting
this value. It's further possible to dynamically detect if the system
supports importing .mpy files by `hasattr(sys.implementation, 'mpy')`.
|
|
|
|
|
|
|
|
To run the testsuite on small ports.
|
|
All breaking changes going from 3.4 to 3.5 are contained in
basics/python34.py.
|
|
|
|
|