-
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
dev-dependencies that are also extras #129
Comments
I have similar use-cases for ReadTheDocs automatic builds: |
I also have an optional dev-dependency in
Currently it does not work. wemake-services/wemake-django-template#685 What happens? |
@sobolevn this is by design as mentioned in #606 (comment). |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This is still valid. |
I believe the best solution to this has been proposed in #1644. |
As @thejohnfreeman wrote, this will be possible with dependency groups which are planned for poetry 1.2. I'll close this one in favor of #1644. |
This hasn't really been solved by #1644, has it? It's still not possible to specify dependencies that belong to both an "extras" group and a Poetry group (like dev) without repeating them, version and all, is it? All that happened is that dev-dependencies became the "dev" group - how does that solve this? Something like #4842 might be able to make some progress here. |
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've got a somewhat weird requirement:
Project A provides a bunch of pytest fixtures, and uses pytest itself for testing. I want to provide an extra on the resulting distributable that is called "testing".
So I created the following:
This will work correctly, however the dependency on
pytest
is specified twice. Once undertool.poetry.dependencies
and another time undertool.poetry.dev-dependencies
. What I would like to do is make sure that the same thing isn't listed twice, so I tried the following:Hoping that the
testing
extra would pick uppytest
fromdev-dependencies
. However this is not the case.So I moved
pytest
back up, and made itoptional
:Now it is correctly picked up, but there is no way to specify that when installing
dev-dependencies
that the extratesting
should be automatically installed too, since that now contains thepytest
dependency.Trying:
Did not work since it could not find
mypackage
, and I am sure that if it could find it, it would likely download it from pypi which is not intended.Is there a way to refer to
self
somehow? Or would it be possible to add a dependency in one place (define its version and extras/requirements) without redefining it indev-dependencies
?The goal ultimately is that a secondary package would have the following
pyproject.toml
:And only if you are developing would it install
mypackage[testing]
but for production it would installmypackage
. Using the version constraint fromtool.poetry.dependencies
vs the constraint specified intool.poetry.dev-dependencies
.This is related to secondary issue: #128
The text was updated successfully, but these errors were encountered: