Install wheel based on platform
See original GitHub issue-
I am on the latest Poetry version.
-
I have searched the issues of this repo and believe that this is not a duplicate.
-
If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option). -
OS version and name: OSX 10.14.6
-
Poetry version: Poetry 0.12.17
-
Link of a Gist with the contents of your pyproject.toml file: not helpful as local files would be necessary
Issue
Based on this documentation, the following should be possible:
[tool.poetry.dependencies]
...
my_package = [
{ platform = "linux", file = "./my_package-1.0.0-cp37-cp37m-linux_x86_64.whl"},
{ platform = "darwin", file = "./my_package-1.0.0-cp37-cp37m-macosx_10_13_x86_64.whl" },
]
Each dependency is correctly handled on its own (aka ignored/installed), but pip seems to always try to install the first dependency if ANY dependency inside the array matches. So the above construct works on linux but not on osx, exchanging the line order swaps the behavior.
I understand this might be annoying to reproduce since it requires two local wheels for different platforms.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:30
- Comments:10 (3 by maintainers)
Top GitHub Comments
I’m also having difficulty with this:
The same thing happened to me, and I am using poetry 1.1.4. I have a path dependency that will include different extras in different platform. Different extras only work in their specific platform. I have a marker saying “sys_platform == ‘win32’” and a second one saying “sys_platform == ‘darwin’”. It turns out the first one is chosen on MacOS and poetry tries to install the extra for win32, which failed. If I switch the order of the two constraints, poetry successfully install the constrained package on MacOS.
Could maintainer please reopen this issue? @abn