From e7e001c1597cc112b1627824bcf5bc1edb398db0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Fri, 18 Feb 2022 18:42:24 +0100 Subject: [PATCH] Install littlefs-python during pio run (#1220) Install only if it is missing from the ENV. Caveat: this python module is essentially lib binding and needs Cython and a working compiler as well. this MAY or MAY NOT work. --- bin/platformio-custom.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/platformio-custom.py b/bin/platformio-custom.py index 1443f6d4..d4117b4b 100644 --- a/bin/platformio-custom.py +++ b/bin/platformio-custom.py @@ -8,6 +8,10 @@ from readprops import readProps Import("env") env.Replace( MKSPIFFSTOOL=env.get("PROJECT_DIR") + '/bin/mklittlefs.py' ) +try: + import littlefs +except ImportError: + env.Execute("$PYTHONEXE -m pip install --user littlefs-python") Import("projenv")