aboutsummaryrefslogtreecommitdiff
path: root/src/ee/tools
diff options
context:
space:
mode:
Diffstat (limited to 'src/ee/tools')
-rw-r--r--src/ee/tools/ninja.py7
-rw-r--r--src/ee/tools/templates/build.ninja.j25
2 files changed, 6 insertions, 6 deletions
diff --git a/src/ee/tools/ninja.py b/src/ee/tools/ninja.py
index 0987004..f04b174 100644
--- a/src/ee/tools/ninja.py
+++ b/src/ee/tools/ninja.py
@@ -28,7 +28,7 @@ def ninja_path_filter(s: Union[Path, str, List[str]]) -> str:
raise Exception("Unsupported argument type: {}".format(type(s)))
-def parent_dir_filter(s: str) -> Path:
+def parent_dir_filter(s: Union[str, Path]) -> Path:
return Path(s).parent
@@ -76,9 +76,10 @@ def generate(project: Project, sch_path: Path, kicad_bom_strategy: Optional[str]
if gerber_zip is not None:
params["gerber_zip"] = gerber_zip
- build_ninja = sch_path.parent / "build.ninja"
+ # ee_dir = sch_path.parent / "ee"
+ ee_dir = Path(".")
+ build_ninja = ee_dir / "build.ninja"
- ee_dir = sch_path.parent / "ee"
parts_yaml_files = [path for path in ee_dir.iterdir() if str(path).endswith("-parts.yaml")]
params["parts_yaml_files"] = parts_yaml_files
diff --git a/src/ee/tools/templates/build.ninja.j2 b/src/ee/tools/templates/build.ninja.j2
index 9489aac..514e177 100644
--- a/src/ee/tools/templates/build.ninja.j2
+++ b/src/ee/tools/templates/build.ninja.j2
@@ -52,9 +52,8 @@ build {{ gerber_zip }}: kicad-gerber $pcb
{%- endif %}
build ee/sch.xml: kicad-make-bom $sch
- strategy = {{ "--strategy " + kicad_bom_strategy if kicad_bom_strategy else "" }}
-
-{%- for d in distributors %}
+ strategy ={{ " --strategy " + kicad_bom_strategy if kicad_bom_strategy else "" }}
+{% for d in distributors %}
# Distributor {{ d }}
build ee/{{ d }}/search-list.xml: part-create-distributor-search-list ee/sch.xml
distributor = {{ d }}