Add new p4a opts - #2010
Conversation
| self.extra_p4a_args.append("--debug") | ||
|
|
||
| save_wheel_dir = self.buildozer.config.getdefault('app', "p4a.save_wheel_dir", "") | ||
| if save_wheel_dir != "": |
There was a problem hiding this comment.
!= "" is not needed. Just use if save_wheel_dir:
| # These indexes are searched in addition to the default PyPI index during Android builds. | ||
| # WARNING: Third party indexes are untrusted sources and may introduce supply chain risks, | ||
| # including malicious, tampered, outdated, or incompatible packages. | ||
| extra_index_urls = https://chaquo.com/pypi-13.1/, https://anshdadwal.is-a.dev/p4a-wheels/p4a/ |
There was a problem hiding this comment.
I think it's not my decision, I think it should be empty by default - until kivy hosts it's own.
The index that I am hosting isn't granted to be stable (or secure?). It currently hosts every PyProjectRecipe and makes builds faster for me.
|
|
||
| # (bool) Disable use of prebuilt binary packages when available (currently Android only) | ||
| # If enabled, all dependencies are built from source even if prebuilt wheels exist. | ||
| skip_prebuilt = False |
There was a problem hiding this comment.
Shouldn't we have the default match the current buildozer behavior which is to build from source and not use prebuilt binaries?
And actually I have the same question for the (now merged) p4a pull request (kivy/python-for-android#3280)
| # These indexes are searched in addition to the default PyPI index during Android builds. | ||
| # WARNING: Third party indexes are untrusted sources and may introduce supply chain risks, | ||
| # including malicious, tampered, outdated, or incompatible packages. | ||
| extra_index_urls = https://chaquo.com/pypi-13.1/ |
There was a problem hiding this comment.
Don't we miss the p4a.* namespace here and in the other options?
So p4a.extra_index_urls here for instance
There was a problem hiding this comment.
This was done keeping in mind that this option in future will also be implemented for iOS.
| # These indexes are searched in addition to the default PyPI index during Android builds. | ||
| # WARNING: Third party indexes are untrusted sources and may introduce supply chain risks, | ||
| # including malicious, tampered, outdated, or incompatible packages. | ||
| extra_index_urls = https://chaquo.com/pypi-13.1/ |
There was a problem hiding this comment.
Also agree with @kuzeyron that maybe we shouldn't enable/ship an "untrusted" thirdparty index by default. Maybe keeping it commented out would be good enough
| self.extra_p4a_args.append(f"--extra-index-url={index}") | ||
|
|
||
| use_prebuilt_version_for = self.buildozer.config.getlist('app', "use_prebuilt_version_for", "") | ||
| for _recipes in use_prebuilt_version_for: |
There was a problem hiding this comment.
nit: I'm not sure we need the leading underscore, I would drop it
| if save_wheel_dir != "": | ||
| self.extra_p4a_args.append(f"--save-wheel-dir={save_wheel_dir}") | ||
|
|
||
| extra_index_urls = self.buildozer.config.getlist('app', "extra_index_urls", "") |
There was a problem hiding this comment.
Why don't we default to [] for both getlist() calls?
Ref: kivy/python-for-android#3280