From 352009073e29bd6eae19c19d7d2290f559978be1 Mon Sep 17 00:00:00 2001 From: norbert-walter Date: Mon, 2 Feb 2026 21:38:14 +0100 Subject: [PATCH] Setup to remote project --- extra_script.py | 30 +++--------------------------- 1 file changed, 3 insertions(+), 27 deletions(-) diff --git a/extra_script.py b/extra_script.py index dd9a90b..ed62c64 100644 --- a/extra_script.py +++ b/extra_script.py @@ -10,7 +10,7 @@ from datetime import datetime import re import pprint from platformio.project.config import ProjectConfig -from platformio.project.exception import InvalidProjectConfError + Import("env") #print(env.Dump()) @@ -104,17 +104,7 @@ def writeFileIfChanged(fileName,data): return True def mergeConfig(base,other): - try: - customconfig = env.GetProjectOption("custom_config") - except InvalidProjectConfError: - customconfig = None for bdir in other: - if customconfig and os.path.exists(os.path.join(bdir,customconfig)): - cname=os.path.join(bdir,customconfig) - print("merge custom config {}".format(cname)) - with open(cname,'rb') as ah: - base += json.load(ah) - continue cname=os.path.join(bdir,"config.json") if os.path.exists(cname): print("merge config %s"%cname) @@ -284,9 +274,9 @@ class Grove: def _ss(self,z=False): if z: return self.name - return self.name if self.name != 'Z' else '' + return self.name if self.name is not 'Z' else '' def _suffix(self): - return '_'+self.name if self.name != 'Z' else '' + return '_'+self.name if self.name is not 'Z' else '' def replace(self,line): if line is None: return line @@ -526,17 +516,3 @@ env.Append( ) #script does not run on clean yet - maybe in the future env.AddPostAction("clean",cleangenerated) - -#look for extra task scripts and include them here -for taskdir in userTaskDirs: - script = os.path.join(taskdir, "extra_task.py") - if os.path.isfile(script): - taskname = os.path.basename(os.path.normpath(taskdir)) - print("#extra task script for '{}'".format(taskname)) - with open(script) as fh: - try: - code = compile(fh.read(), taskname, 'exec') - except SyntaxError: - print("#ERROR: script does not compile") - continue - exec(code)