diff --git a/Makefile.include b/Makefile.include index 7233704fdb77a6163e7234df297cbd7cdc7983a3..e1f850296074dd33493f0eb7a260b0f988c3c8b6 100644 --- a/Makefile.include +++ b/Makefile.include @@ -70,6 +70,9 @@ BUILDRELPATH ?= $(CURDIR:$(RIOTPROJECT)/%=%)/ # get host operating system OS := $(shell uname) +# set python path, e.g. for tests +PYTHONPATH := $(RIOTBASE)/dist/pythonlibs/:$(PYTHONPATH) + # Include Docker settings near the top because we need to build the environment # command line before some of the variable origins are overwritten below when # using abspath, strip etc. diff --git a/dist/pythonlibs/README.md b/dist/pythonlibs/README.md new file mode 100644 index 0000000000000000000000000000000000000000..7fa8fbedb1b52a62b2fc80a16a8a04786be9fe89 --- /dev/null +++ b/dist/pythonlibs/README.md @@ -0,0 +1,2 @@ +This directory is exported through PYTHONPATH environment variable in the build system. +Put any RIOT specific Python packages here. diff --git a/makefiles/vars.inc.mk b/makefiles/vars.inc.mk index 300fedbb2d110e6c666a2e000e81cb9b42c90282..7194443c846e7a4faf72f032eb21ac0a2d02da5b 100644 --- a/makefiles/vars.inc.mk +++ b/makefiles/vars.inc.mk @@ -31,6 +31,8 @@ export BINDIR # This is the folder where the application should b export APPDIR # The base folder containing the application export PKGDIRBASE # The base folder for building packages +export PYTHONPATH # Python default search path for module filesi, with RIOT specific packages + export FEATURES_REQUIRED # List of required features by the application export FEATURES_PROVIDED # List of provided features by the board export FEATURES_OPTIONAL # List of nice to have features