Skip to content

Allow bundles to be skipped #97

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 28, 2023

Conversation

tekktrik
Copy link
Member

Allows bundles to be skipped from being built. This is useful when libraries that do not need specific bundles (e.g., circuitpython_typing does not need .mpy bundles) are built.

@tekktrik tekktrik requested a review from a team July 11, 2023 01:51
@tekktrik
Copy link
Member Author

Needed to close out adafruit/Adafruit_CircuitPython_Typing#34

@@ -234,7 +234,10 @@ def _find_libraries(current_path, depth):
@click.option('--library_depth', default=0, help="Depth of library folders. This is useful when multiple libraries are bundled together but are initially in separate subfolders.")
@click.option('--package_folder_prefix', default="adafruit_", help="Prefix string used to determine package folders to bundle.")
@click.option('--remote_name', default="origin", help="Git remote name to use during building")
def build_bundles(filename_prefix, output_directory, library_location, library_depth, package_folder_prefix, remote_name):
@click.option('--ignore', default="", help="Bundles to ignore building")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not tickled about the separator being ", " since this requires shell quoting --ignore "py, mpy" and is easy to get wrong, --ignore py,mpy is an undiagnosed error.

If you use @click.option('--ignore', '-i', multiple=True, type=click.Choice(["py", "mpy", "json"])) then you don't have to do the parsing, you just give zero or more --ignore arguments, and errors are detected.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! I also felt not great about that, but your suggestion is MUCH more elegant. I'll fix this up this evening!

Copy link
Contributor

@jepler jepler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@tekktrik tekktrik merged commit bc2d2a0 into adafruit:main Jul 28, 2023
@tekktrik tekktrik deleted the dev/bundle-build-ignore branch February 12, 2024 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants