Skip to content
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

Allow overriding zipapp config from command line #280

Open
duckinator opened this issue Dec 26, 2021 · 1 comment
Open

Allow overriding zipapp config from command line #280

duckinator opened this issue Dec 26, 2021 · 1 comment
Milestone

Comments

@duckinator
Copy link
Owner

duckinator commented Dec 26, 2021

Being able to pass arguments to bork build to override zipapp configuration would be very nice, especially for testing/debugging if a zipapp of a project can be built.

I'm thinking:

--zipapp [true|false]       If true, build a zipapp. Otherwise, don't build a zipapp.
--zipapp-name NAME          NAME is the name of the project, as used in the ZipApp filename.
--zipapp-main ENTRYPOINT    ENTRYPOINT is of the format "some.module:function_name". Implies `--zipapp true`.

This means if you want to test a zipapp build, you can just do (e.g.) bork build --name fido --zipapp-main fido.fido:main

@duckinator
Copy link
Owner Author

duckinator commented Dec 26, 2021

This issue was inspired by trying to make a ZipApp of fido: https://github.com/openpreserve/fido

I downloaded the latest release, and made very few changes and was able to make a zipapp of it.

First, I added a pyproject.toml with these contents:

[tool.bork.zipapp]
enabled = true
main = "fido.fido:main"

And added this at the start of their setup.cfg:

[metadata]
name=fido

If what I suggested above, or an equivalent, is implemented, this can be done with bork build --zipapp-name fido --zipapp-main fido.fido:main and no code changes from what they already have.

@duckinator duckinator modified the milestone: v6.1.0 Mar 29, 2022
@duckinator duckinator added this to the v7.0.0 milestone Apr 12, 2023
@duckinator duckinator modified the milestones: v7.0.0, v7.1.0 Nov 7, 2023
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

No branches or pull requests

1 participant