-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
url-dependency is missing from multiple-constraints-dependency #2033
url-dependency is missing from multiple-constraints-dependency #2033
Comments
Added PR for fix: #2035 |
@djlancelot When I run this [tool]
[tool.poetry]
name = "torch_test"
version = "1.0.0"
description = ""
authors = [""]
[tool.poetry.dependencies]
torch = [
{url = "https://download.pytorch.org/whl/cpu/torch-1.4.0%2Bcpu-cp37-cp37m-linux_x86_64.whl", markers = "sys_platform == 'linux'"},
{version="^1.4.0", markers = "sys_platform == 'darwin'"}
]
[tool.poetry.dev-dependencies]
[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"
|
@lejafar did you manage to fix it? @djlancelot I have pretty much the same on Catalina 10.15.4 |
No I didn't :/ |
@lejafar , @AlexJoz There are multiple issues with the URL dependency, although you can specify it from 1.0.5, it will still fail. We ended up doing something completely different, but I tried to solve this for you and this is why it breaks: I noticed that the
However, it turned out that the URL dependency supports just a few properties and python markers or platform is not one of them. Until those parameters are added platform based dependencies will only work with simple packages ( you can try having a private pypi repo with the Linux wheel and downloading the dependencies from there, that should work ). |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
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.15.2 and Ubuntu
Poetry version: 1.0.2
Relevant part:
Issue
Hi there,
When I tried adding multiple constraints using an url dependency I got the following error message:
The dependency doesn't seem to be valid under any of the given schemas.
Possible reason
After looking at the source code I found that the schema descriptor file is missing the url-dependency from the list of values here:
poetry/poetry/json/schemas/poetry-schema.json
Line 444 in 7d5934e
Possible solution
Add the url-dependency to the list of values for multiple constraints:
Let me know what you think.
The text was updated successfully, but these errors were encountered: