Skip to content

Commit

Permalink
Fix missing subdirectories in firmware build
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisib committed Jan 18, 2025
1 parent 03d66da commit ff266b4
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions software/firmware/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,23 @@
def build_firmware_module_list():
import os

dirs = {"experimental"}
dirs = {"experimental", "tools"}
excluded = {"__init__.py", "setup.py"}

return [f[:-3] for f in os.listdir(".") if f.endswith(".py") and f not in excluded] + [
".".join([d, f[:-3]])
for d in dirs
for f in os.listdir(d)
if f.endswith(".py") and f not in excluded
# grab files from the local directory first
modules = [
f[:-3] for f in os.listdir(".") if f.endswith(".py") and not f in excluded
]

# add any modules in additional directories
for d in dirs:
for (root_dir, subdirs, files) in os.walk(d):
for f in files:
if f.endswith(".py") and not f in excluded:
modules.append(root_dir.replace("/", ".") + "." + f[:-3])

return modules


setup(
name="micropython-europi",
Expand Down

0 comments on commit ff266b4

Please sign in to comment.