-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correct sys.version
to say "CircuitPython" instead of "MicroPython"
#8808
Conversation
This seems OK to me. In CPython, it's something like this:
so including all the info above is not out of line with that. In CPython Could you try changing
in |
This reverts commit a7e4501.
Don't remove the |
I put it back. It's just that locally it builds and runs fine.
|
I'll look at it in more detail a little later, since this is not urgent. |
Same here. I will try building in a container tomorrow. |
Try with: diff --git a/py/makeversionhdr.py b/py/makeversionhdr.py
index 430b9bef4b..edcb994b4f 100644
--- a/py/makeversionhdr.py
+++ b/py/makeversionhdr.py
@@ -119,7 +119,7 @@ def make_version_header(repo_path, filename):
#define MICROPY_VERSION_STRING "%s"
// Combined version as a 32-bit number for convenience
#define MICROPY_VERSION (MICROPY_VERSION_MAJOR << 16 | MICROPY_VERSION_MINOR << 8 | MICROPY_VERSION_MICRO)
-#define MICROPY_FULL_VERSION_INFO "Adafruit CircuitPython " MICROPY_GIT_TAG " on " MICROPY_BUILD_DATE "; " MICROPY_HW_BOARD_NAME " with " MICROPY_HW_MCU_NAME
+#define MICROPY_FULL_VERSION_INFO "Adafruit CircuitPython " MICROPY_GIT_TAG " on " MICROPY_BUILD_DATE "; " MICROPY_BANNER_MACHINE
""" % (
git_tag,
git_hash, On the "unix port", MICROPY_HW_BOARD_NAME and MICROPY_HW_MCU_NAME are not defined. mpconfig picks one of two forms of BANNER depending on definedness so it should give what you want: // String used for the second part of the banner, and sys.implementation._machine
#ifndef MICROPY_BANNER_MACHINE
#ifdef MICROPY_HW_BOARD_NAME
#define MICROPY_BANNER_MACHINE MICROPY_HW_BOARD_NAME " with " MICROPY_HW_MCU_NAME
#else
#define MICROPY_BANNER_MACHINE MICROPY_PY_SYS_PLATFORM " [" MICROPY_PLATFORM_COMPILER "] version"
#endif |
I went ahead and added that change to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to go if the build is green
@jepler Looks like the REPL tests were broken. |
Oh whoops, sorry for the late response, I'm having exams currently, so I'm not very active.
Works as intended. I will try to take a look at the tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In a video chat, Dan reiterated his concern about the growth of flash due to including the long "MICROPY_FULL_VERSION_INFO" so we might just make the smaller change in mpconfig.h and leave the rest aside for now.
Even though that string already exists in flash? |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for persevering on this as I changed my mind, and thanks for fixing the tests.
sys.version
to say "CircuitPython" instead of "MicroPython"
Same string as
pyexec_friendly_repl
. This is also a great way to get the board info during runtime all at once!Fixes #8802