def init_base_project(project_dir): if util.is_platformio_project(project_dir): return copyfile(join(util.get_source_dir(), "projectconftpl.ini"), join(project_dir, "platformio.ini")) with util.cd(project_dir): dir_to_readme = [ (util.get_projectsrc_dir(), None), (util.get_projectinclude_dir(), init_include_readme), (util.get_projectlib_dir(), init_lib_readme), (util.get_projecttest_dir(), init_test_readme), ] for (path, cb) in dir_to_readme: if isdir(path): continue makedirs(path) if cb: cb(path)
def init_base_project(project_dir): if util.is_platformio_project(project_dir): return copyfile( join(util.get_source_dir(), "projectconftpl.ini"), join(project_dir, "platformio.ini")) with util.cd(project_dir): dir_to_readme = [ (util.get_projectsrc_dir(), None), (util.get_projectinclude_dir(), init_include_readme), (util.get_projectlib_dir(), init_lib_readme), (util.get_projecttest_dir(), init_test_readme), ] for (path, cb) in dir_to_readme: if isdir(path): continue makedirs(path) if cb: cb(path)
DEFAULT_ENV_OPTIONS = dict( tools=[ "ar", "gas", "gcc", "g++", "gnulink", "platformio", "pioplatform", "piowinhooks", "piolib", "pioupload", "piomisc", "pioide" ], # yapf: disable toolpath=[join(util.get_source_dir(), "builder", "tools")], variables=commonvars, # Propagating External Environment PIOVARIABLES=commonvars.keys(), ENV=environ, UNIX_TIME=int(time()), PIOHOME_DIR=util.get_home_dir(), PROJECT_DIR=util.get_project_dir(), PROJECTINCLUDE_DIR=util.get_projectinclude_dir(), PROJECTSRC_DIR=util.get_projectsrc_dir(), PROJECTTEST_DIR=util.get_projecttest_dir(), PROJECTDATA_DIR=util.get_projectdata_dir(), PROJECTBUILD_DIR=util.get_projectbuild_dir(), BUILD_DIR=join("$PROJECTBUILD_DIR", "$PIOENV"), BUILDSRC_DIR=join("$BUILD_DIR", "src"), BUILDTEST_DIR=join("$BUILD_DIR", "test"), LIBPATH=["$BUILD_DIR"], LIBSOURCE_DIRS=[ util.get_projectlib_dir(), util.get_projectlibdeps_dir(), join("$PIOHOME_DIR", "lib") ], PROGNAME="program", PROG_PATH=join("$BUILD_DIR", "$PROGNAME$PROGSUFFIX"),
DEFAULT_ENV_OPTIONS = dict( tools=[ "ar", "gas", "gcc", "g++", "gnulink", "platformio", "pioplatform", "piowinhooks", "piolib", "pioupload", "piomisc", "pioide" ], # yapf: disable toolpath=[join(util.get_source_dir(), "builder", "tools")], variables=commonvars, # Propagating External Environment PIOVARIABLES=commonvars.keys(), ENV=environ, UNIX_TIME=int(time()), PIOHOME_DIR=util.get_home_dir(), PROJECT_DIR=util.get_project_dir(), PROJECTINCLUDE_DIR=util.get_projectinclude_dir(), PROJECTSRC_DIR=util.get_projectsrc_dir(), PROJECTTEST_DIR=util.get_projecttest_dir(), PROJECTDATA_DIR=util.get_projectdata_dir(), PROJECTBUILD_DIR=util.get_projectbuild_dir(), BUILD_DIR=join("$PROJECTBUILD_DIR", "$PIOENV"), BUILDSRC_DIR=join("$BUILD_DIR", "src"), BUILDTEST_DIR=join("$BUILD_DIR", "test"), LIBSOURCE_DIRS=[ util.get_projectlib_dir(), util.get_projectlibdeps_dir(), join("$PIOHOME_DIR", "lib") ], PROGNAME="program", PROG_PATH=join("$BUILD_DIR", "$PROGNAME$PROGSUFFIX"), PYTHONEXE=util.get_pythonexe_path())