diff options
Diffstat (limited to 'py')
| -rw-r--r-- | py/modsys.c | 3 | ||||
| -rw-r--r-- | py/mpconfig.h | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/py/modsys.c b/py/modsys.c index ac9077622..bdc4d6973 100644 --- a/py/modsys.c +++ b/py/modsys.c @@ -36,6 +36,7 @@ #include "py/smallint.h" #include "py/runtime.h" #include "py/persistentcode.h" +#include "genhdr/mpversion.h" #if MICROPY_PY_SYS_SETTRACE #include "py/objmodule.h" @@ -54,7 +55,7 @@ const mp_print_t mp_sys_stdout_print = {&mp_sys_stdout_obj, mp_stream_write_adap #endif // version - Python language version that this implementation conforms to, as a string -STATIC const MP_DEFINE_STR_OBJ(mp_sys_version_obj, "3.4.0"); +STATIC const MP_DEFINE_STR_OBJ(mp_sys_version_obj, "3.4.0; " MICROPY_BANNER_NAME_AND_VERSION); // version_info - Python language version that this implementation conforms to, as a tuple of ints #define I(n) MP_OBJ_NEW_SMALL_INT(n) diff --git a/py/mpconfig.h b/py/mpconfig.h index c308c31bd..0b190a997 100644 --- a/py/mpconfig.h +++ b/py/mpconfig.h @@ -1714,6 +1714,11 @@ typedef double mp_float_t; #define MICROPY_OBJ_BASE_ALIGNMENT #endif +// String used for the banner, and sys.version additional information +#ifndef MICROPY_BANNER_NAME_AND_VERSION +#define MICROPY_BANNER_NAME_AND_VERSION "MicroPython " MICROPY_GIT_TAG " on " MICROPY_BUILD_DATE +#endif + // On embedded platforms, these will typically enable/disable irqs. #ifndef MICROPY_BEGIN_ATOMIC_SECTION #define MICROPY_BEGIN_ATOMIC_SECTION() (0) |
