-
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
How can I specify differing sets of dependency extras for each of my project's extras? #834
Comments
@sdispater Gently bumping this – is this use case compelling enough to warrant some attention? |
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. |
Bumping again, because the issue is outstanding and marks a flaw in the way dependencies are modeled, preventing reasonable use of this application. Hope somebody can take a look at this. |
Looks like you can install multiple dependencies in a single set using the following approach:
resulting in the following changes to the pyproject.toml file:
But running You need to add the following entry to the pyproject.toml file: [tool.poetry.extras] and then |
Thanks for creating this issue, @kurtiss. We have the same problem. I would prefer option (2) proposed by @kurtiss, because it feels more intuitive - this was the first thing I tried. What do you think, @sdispater? @wshayes you are describing a different use-case here. |
I'm looking to port celery from setuptools to poetry and have this problem also See #4313 |
I reported a possible solution using markers here: #4313 (comment). |
Is this still being worken on? It'quite important to decrease size of package installs for other packages that depend on packages build with poetry. |
I have a subtly different use case, which I'm not sure works with the currently proposed solutions without some modification. For example:
|
Hi, do we have workarounds this ? We do have the same problem, we want to be able to specify extras that depends on each other to avoid redundancy but they are not getting installed. Thanks! |
So basically, what we did is we created another pyproject.toml which we edit and we use the syntax : [tool.poetry.extras]
mylib1 = [
"oauthlib",
"requests_oauthlib",
]
mylib2 = [
"mylib1 ",
"Flask",
"Fastapi",
] And we created a script that generates a pyproject.toml file and when it does, it repaces "mylib1" by all the requirements in it. For example we would have something like that : [tool.poetry.extras]
mylib1 = [
"oauthlib",
"requests_oauthlib",
]
mylib2 = [
"oauthlib",
"requests_oauthlib",
"Flask",
"Fastapi",
] We added this in a pre-commit, and it's done. |
Question
How can I specify differing sets of dependency extras for each of my project's extras? This is something that is relatively trivial to do with setup.py. To clarify, I would like to be able to specify the following dependency graph:
I'll propose a couple ways that pyproject.toml might model these graphs, but the core value of these examples is to highlight an apparent deficiency with the current model.
Thanks for your time!
The text was updated successfully, but these errors were encountered: