diff options
| author | stijn | 2020-02-04 11:09:09 +0100 |
|---|---|---|
| committer | Damien George | 2020-02-11 13:34:35 +1100 |
| commit | 5f91933e54b103e5ba7add7f0762659709ea5adb (patch) | |
| tree | 0edb9bfa2f80acb4256efe826042b16349f4c1b9 /ports/windows | |
| parent | 8b6e6008c766e61f97e0af8b6c36c06410a9f17d (diff) | |
windows: Improve default search path.
The default value for MICROPYPATH used in unix/main.c is
"~/.micropython/lib:/usr/lib/micropython" which has 2 problems when used in
the Windows port:
- it has a ':' as path separator but the port uses ';' so the entire string
is effectively discarded since it gets interpreted as a single path which
doesn't exist
- /usr/lib/micropython is not a valid path in a standard Windows
environment
Override the value with a suitable default.
Diffstat (limited to 'ports/windows')
| -rw-r--r-- | ports/windows/mpconfigport.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ports/windows/mpconfigport.h b/ports/windows/mpconfigport.h index fae01d74e..2d852a822 100644 --- a/ports/windows/mpconfigport.h +++ b/ports/windows/mpconfigport.h @@ -81,6 +81,9 @@ #define MICROPY_PY_BUILTINS_SLICE_ATTRS (1) #define MICROPY_PY_SYS_EXIT (1) #define MICROPY_PY_SYS_PLATFORM "win32" +#ifndef MICROPY_PY_SYS_PATH_DEFAULT +#define MICROPY_PY_SYS_PATH_DEFAULT "~/.micropython/lib" +#endif #define MICROPY_PY_SYS_MAXSIZE (1) #define MICROPY_PY_SYS_STDFILES (1) #define MICROPY_PY_SYS_EXC_INFO (1) |
