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.
This commit is contained in:
Thomas Göttgens 2022-02-18 18:42:24 +01:00 committed by GitHub
parent 54f062e94d
commit e7e001c159
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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")