config: introduce installer.no-binary#5609
Conversation
|
Deploy preview for website ready! Built with commit 2a2e4fe. |
This change replaces the `--no-binary` option introduced in python-poetry#5600 as the original implementation could cause inconsistent results when the add, update or lock commands were used. This implementation makes use of a new configuration `installer.no-binary` to allow for user specification of sdist preference for select packages.
|
@abn I tested it. As far as I can tell it works great and the docs are clear. Kudos! As I mentioned in the issue, my only concern is whether [tool.poetry.no-binary]
packages = [
"shapely",
"pygeos",
]From a UX point of view, both approaches should be practically equivalent. The That being said, you have a much better understanding of the "spirit" of poetry's configuration so I trust your judgement. |
|
Right now I think this is the best route as the alternative might set incorrect expectations and cause unintended side-effects. Nothing stopping us from iterating on this. But watch this space :). |
|
out of curiosity, can I ask why not have it as an option on a specific dependency? so you could do something like specifying [tool.poetry.dependencies]
numpy = [
{ version = "^1.20.0", no_binary = true, markers="sys_platform == 'win32'" },
{ version = "^1.20.0", markers="sys_platform != 'win32'" }
] |
|
Part of the reasons are mentioned in #5599 (comment). I do not think this is completely infeasible, however not something we would want to implement right now. And I am still not convinced this is upto the project to decide as this. In addition to the above, the solution in this PR also applies to indirect dependencies as well. Because, often times the issues faced by users are to do with a package that are not a dependency of the package itself. Ofcourse, you can add it explicitly to the package. So, the inconsistencies it can introduce and lack of an implementation that addresses all concerns are reasons why the dependency specific configuration is not prefered at this point in time. |
|
@abn this isn't working in 1.2b3 for me... Ohhhhh |
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
This change replaces the
--no-binaryoption introduced in #5600 as the original implementation could cause inconsistent results when the add, update or lock commands were used.This implementation makes use of a new configuration
installer.no-binaryto allow for user specification of sdist preference for select packages.References: #5600 #5599 (comment)
Relates-to: #1316 #5599 #365