Conversation
|
Not sure why ci is failing. |
André made some changes to the CI so this PR needs a rebase. |
206839a to
a6b79cb
Compare
a6b79cb to
ab545fb
Compare
ab545fb to
4ecc0ad
Compare
|
Ping @AndreMiras for review. |
4f95cbd to
3f78877
Compare
98d0461 to
6813d66
Compare
This reverts commit 6813d66.
|
@AndreMiras Thanks for the detailed review! Do you want me to add tests for new methods that are introduced in |
Thank you for addressing all my initial review concerns so quick 🙏 |
| name_str = self.name | ||
| if self.name not in self.ctx.use_prebuilt_version_for and self.version is not None: | ||
| # Like: v2.3.0 -> 2.3.0 | ||
| cleaned_version = self.version.replace("v", "") |
There was a problem hiding this comment.
What if we have 2.3.0dev1, refs PEP 440 & https://packaging.python.org/en/latest/specifications/version-specifiers/#developmental-releases
Maybe we should use that instead:
cleaned_version = self.version.lstrip("v")| 'prebuilt version from the extra index if available.' | ||
| 'Only applies to packages with a recipe.' |
There was a problem hiding this comment.
Minor add a trailing slash after "available. " to prevent having "available.Only"
| error( | ||
| f"python3 should have same version as hostpython3, {python_recipe.version} != {self.version}" | ||
| ) | ||
| exit(1) |
There was a problem hiding this comment.
Maybe we want to raise BuildInterruptingException... instead so the whole thing doesn't get killed and we get a chance to teardown/cleanup?
| return PyProjectRecipe.get_wheel_platform_tags(arch, self.ctx)[0] | ||
|
|
||
| def install_prebuilt_wheel(self, arch): | ||
| info("Installing prebuilt built wheel") |
There was a problem hiding this comment.
Maybe drop the "built" and go for "Installing prebuilt wheel"
AndreMiras
left a comment
There was a problem hiding this comment.
Left some additional minor comments, but things look good in general.
Thank you for the hard work @T-Dynamos 💪
I'd be happy to merge it soon.
Also I think we should follow up with improving the integration testing to cover prebuilt wheels install and runtime use, but that can be addressed after this merge
New options
--extra-index-urlAdditional package indexes to search for prebuilt wheels.
Can be used multiple times.
Example:
--skip-prebuiltDo not use prebuilt wheels; always build from source.
--use-prebuilt-version-forFor these packages, ignore recipe-pinned versions and use the latest prebuilt from the extra index if available.
Only applies to packages with a recipe.
Can be used multiple times.
Example:
--save-wheel-dirDirectory where wheels built by
PyProjectRecipeare saved.If set, any wheel produced during a recipe build is copied to this directory.
New behavior
When a recipe (any
PyProjectRecipe) is built, it checks whether a prebuilt version is available. If so, it uses it; otherwise, it falls back to building from source.test requirements:
requirements = python3, kivy==master, numpy, openaiwith
--use-prebuilt-version-for kivyAlso works if a package recipe does not exist; available packages are installed at a later stage.