-
-
Notifications
You must be signed in to change notification settings - Fork 243
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
generic embedding feedback #470
Comments
Thanks for taking the time to type this all up. Detailed user reports like this are very valuable feedback.
The Starlark configs and related
In addition, the
I think an area worth exploring is enhancing the Starlark APIs to make it easier to emit packed resources and other build artifacts without going through the entire build an executable code path.
It is possible to construct a
There are attributes on the packaging policy to control bytecode optimization level: https://pyoxidizer.readthedocs.io/en/pyoxidizer-0.17/pyoxidizer_config_type_python_packaging_policy.html#starlark_pyoxidizer.PythonPackagingPolicy.bytecode_optimize_level_zero.
Yes, I agree this would solve a lot of problems. However, it gets a bit complicated with how commands like this interact with Starlark. You need to define a Starlark target to evaluate. So I'm thinking that unless we change the Starlark target mechanism (which is a possibility because IMO it feels janky), we should provide a Starlark type to represent build artifacts and config files can provide a target that returns an instance and where |
That's really nice - it sounds like I could use a combination of those two in the future to build and bundle the non-stdlib resources, avoiding the need to patch pyoxidizer.
Yep, I've successfully done those things when using my own pyoxidizer.bzl, but presumably that would not be possible when using generate-python-embedding-artifacts, since it does not use the user-provided config file?
There's already the "resources" target & .to_embedded_resources() - would it make sense if it accepted an optional include_extra_files argument? |
Hello, I'm trying to add an icon to my .exe built in Python with PyOxidizer, but I can't seem to get it to work. I'm not sure if this is the right place to ask this. Thank you in advance. code.bzl:
|
Carrying on from #467 (comment)
Let me firstly briefly elaborate on my use case/desired outcome:
If I have correctly understood how generate-python-embedding-artifacts works (please correct me if I'm wrong), I'm not sure it will work for the above use case:
For now, either #466 or #468 handle my use case pretty well. I like the simplicity of #468, but like the flexibility of #466, and it builds slightly quicker/shows the cargo output in color :-) Not suggesting either of these be included as is, but hopefully they give you an idea of what I'm trying to achieve.
If there were a command like 'generate-all-embedding-artifacts' that used the user-provided pyoxidizer.bzl config and wrote extra_files to disk, I think that would solve all my problems.
The text was updated successfully, but these errors were encountered: