Skip to content

Commit d5092fd

Browse files
authored
Windows compat makefile... again! (#2)
1 parent cda824d commit d5092fd

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

Makefile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ build: download-libraries mpy-cross ## Build the project, store the result in th
6464
@echo "__version__ = '$(VERSION)'" > artifacts/proves/version.py
6565
$(call compile_mpy)
6666
$(call rsync_to_dest,.,artifacts/proves/)
67-
@find artifacts/proves/lib -name '*.py' -type f -delete
67+
@$(UV) run python -c "import os; [os.remove(os.path.join(root, file)) for root, _, files in os.walk('artifacts/proves/lib') for file in files if file.endswith('.py')]"
6868
@echo "Creating artifacts/proves.zip"
6969
@zip -r artifacts/proves.zip artifacts/proves > /dev/null
7070

@@ -128,8 +128,5 @@ endif
128128
endif
129129

130130
define compile_mpy
131-
@find lib -name '*.py' -print0 | while IFS= read -r -d '' file; do \
132-
echo "Compiling $$file to .mpy..."; \
133-
$(MPY_CROSS) $$file; \
134-
done
131+
@$(UV) run python -c "import os, subprocess; [subprocess.run(['$(MPY_CROSS)', os.path.join(root, file)]) for root, _, files in os.walk('lib') for file in files if file.endswith('.py')]" || exit 1
135132
endef

0 commit comments

Comments
 (0)