circuitpython/ports
Damien George 40047823bc py/modsys: Append MicroPython git version and build date to sys.version.
This commit adds the git hash and build date to sys.version.  This is
allowed according to CPython docs, and is what PyPy does.  The docs state:

    A string containing the version number of the Python interpreter plus
    additional information on the build number and compiler used.

Eg on CPython:

    Python 3.10.4 (main, Mar 23 2022, 23:05:40) [GCC 11.2.0] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import sys
    >>> sys.version
    '3.10.4 (main, Mar 23 2022, 23:05:40) [GCC 11.2.0]'

and PyPy:

    Python 2.7.12 (5.6.0+dfsg-4, Nov 20 2016, 10:43:30)
    [PyPy 5.6.0 with GCC 6.2.0 20161109] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>>> import sys
    >>>> sys.version
    '2.7.12 (5.6.0+dfsg-4, Nov 20 2016, 10:43:30)\n[PyPy 5.6.0 with GCC ...

With this commit on MicroPython we now have:

    MicroPython v1.18-371-g9d08eb024 on 2022-04-28; linux [GCC 11.2.0] v...
    Use Ctrl-D to exit, Ctrl-E for paste mode
    >>> import sys
    >>> sys.version
    '3.4.0; MicroPython v1.18-371-g9d08eb024 on 2022-04-28'

Note that the start of the banner is the same as the end of sys.version.
This helps to keep code size under control because the string can be reused
by the compiler.

Signed-off-by: Damien George <damien@micropython.org>
2022-04-28 15:23:17 +10:00
..
bare-arm bare-arm/mpconfigport.h: Disable remaining optional features. 2021-11-01 14:23:06 +11:00
cc3200 extmod/modusocket: Provide config macro for socket.listen backlog deflt. 2022-04-11 15:28:56 +10:00
esp32 esp32/modnetwork: Fix build when MICROPY_PY_NETWORK_WLAN is disabled. 2022-04-22 21:56:31 +10:00
esp8266 esp8266/modesp: Remove esp.info() function. 2022-03-22 11:03:29 +11:00
javascript py/runtime: Allow initialising sys.path/argv with defaults. 2021-12-18 00:08:07 +11:00
mimxrt mimxrt/mphalport: Fix USB CDC RX handling to not block when unprocessed. 2022-04-11 12:30:59 +10:00
minimal ports: Recompile bytecode tests now that .mpy format changed. 2022-04-14 23:52:14 +10:00
nrf nrf/modules: Include uasyncio in default board manifest. 2022-03-30 15:37:49 +11:00
pic16bit all: Update to point to files in new shared/ directory. 2021-07-12 17:08:10 +10:00
powerpc ports: Recompile bytecode tests now that .mpy format changed. 2022-04-14 23:52:14 +10:00
qemu-arm qemu-arm/test-frzmpy: Add test for freezing constant tuples. 2022-04-14 23:52:14 +10:00
rp2 rp2/mpconfigport: Enable execfile, NotImplemented and REPL EMACS keys. 2022-04-26 22:15:07 +10:00
samd ports: Reformat more C and Python source code. 2022-04-20 16:17:35 +10:00
stm32 stm32/boards/NUCLEO_G0B1RE: Add NUCLEO_G0B1RE board definition. 2022-04-28 11:56:15 +10:00
teensy py/runtime: Allow initialising sys.path/argv with defaults. 2021-12-18 00:08:07 +11:00
unix py/modsys: Append MicroPython git version and build date to sys.version. 2022-04-28 15:23:17 +10:00
windows windows: Switch to VFS subsystem and use VfsPosix. 2022-03-10 00:26:36 +11:00
zephyr ports: Reformat more C and Python source code. 2022-04-20 16:17:35 +10:00