-
Notifications
You must be signed in to change notification settings - Fork 677
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
It's not possible to install ansible-lint 6.9.0 using poetry #2730
Comments
Sorry but this is a bug belonging poetry, not ansible-lint. Our dependencies are declared like this on purpose. See https://github.com/ansible/ansible-lint/blob/main/setup.cfg#L74 PS. You might want to see why others dislike poetry |
Hello @ssbarnea, unfortunately defining a non-existing dependency for a specific platform is problematic in multiple cases:
The hint in the documentation about the fact, that Best regards, |
For reference to anyone who finds this ticket, this issue can be workarounded by using ansible-lint = { version = "^6.9.0", markers = "platform_system != 'Windows'" } |
@finswimmer pip-tools compile does not suffer from the same limitations, we use it without problems. You cannot expect that all the dependencies to be always available and I am sure that there are other packages on pypi with similar issues. I also doubt poetry looks at trove metadata lists only POSIX and not Windows as a supported platform. That is a poetry implementation bug that it fails to evaluate the condition before starts looking for the dependency. I supposed it would also fail if the marker is @xfix Thanks for providing a workaround. Feel free to make a PR to add a section for poetry in installation section, so others might find your valuable workaround. |
My personal opinion is that ansible-lint abuses the requirements system, and this work-around is non-ideal because it would break if ansible-lint were to add a similar hack for some other platform. |
@xfix thanks for the workaround. I hope ansible-lint re-thinks this. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Summary
Installing ansible-lint using
poetry add ansible-lint@latest
is not possible.Issue Type
STEPS TO REPRODUCE
Create a new project with
poetry init
and then runpoetry add ansible-lint@latest
Desired Behavior
ansible-lint
should be installed.Actual Behavior
The text was updated successfully, but these errors were encountered: