Skip to content

Commit 739d5be

Browse files
committed
allow packages with one source file
1 parent 768b3ac commit 739d5be

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

circuitpython_build_tools/build.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,11 @@ def library(library_path, output_directory, mpy_cross=None):
110110
raise ValueError("Multiple top level py files not allowed. Please put them in a package "
111111
"or combine them into a single file.")
112112

113-
if len(package_files) > 1:
114-
for fn in package_files:
115-
base_dir = os.path.join(output_directory, os.path.dirname(fn))
116-
if not os.path.isdir(base_dir):
117-
os.makedirs(base_dir)
118-
total_size += 512
113+
for fn in package_files:
114+
base_dir = os.path.join(output_directory, os.path.dirname(fn))
115+
if not os.path.isdir(base_dir):
116+
os.makedirs(base_dir)
117+
total_size += 512
119118

120119

121120
new_extension = ".py"

0 commit comments

Comments
 (0)