question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

poetry add --path=../my_package my_package includes extras when it shouldn't

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: RHEL 7.5

  • Poetry version: 0.12.5

Issue

I have the following layout on disk

├─my_project
│ ├─ pyproject.toml
| ├─ ...
| └─ .git/
|
└─git_clone_of_some_library
  ├─ setup.py
  ├─ ...
  └─ .git/

git_clone_of_some_library/setup.py contains:

from setuptools import find_packages, setup
...
setup(
...
    install_requires=[
...
    ],
    extras_require=dict(
        dev=[
            'a_dev_only_library_not_available_in_my_current_context',
...
        ]
    ),
...
)

So, I’m trying to set up my environment with:

my_project $ poetry install
my_project $ poetry add --path=../git_clone_of_some_library git_clone_of_some_library

But I get:

[SolverProblemError]
Because git_clone_of_some_library (x.y.z) depends on a_dev_only_library_not_available_in_my_current_context (*) which doesn't match any versions, git_clone_of_some_library  is forbidden.
So, because my_project depends on git_clone_of_some_library  (...), version solving failed.

What I don’t understand is why a package in the [dev] extra is being installed? That seems like a bug, but it also raises the question: if I want to specify one or more extras when adding a library as a dependency, how do I do that?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
sdispatercommented, Nov 8, 2018

This should be fixed in the latest 0.12.7 release.

1reaction
narimancommented, Nov 5, 2018

@cjw296, yes, you can. Repeat --develop as many times as you need. –develop=a --develop=b

On Mon, Nov 5, 2018, 09:02 Chris Withers notifications@github.com wrote:

@narimanizett https://github.com/narimanizett - can you specify multiple packages to --develop?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sdispater/poetry/issues/592#issuecomment-435773464, or mute the thread https://github.com/notifications/unsubscribe-auth/AFudnxPNO-zKGYZIT9H0dwLHa-Y5MHMQks5ur-J8gaJpZM4YLwH- .

Read more comments on GitHub >

github_iconTop Results From Across the Web

Local path dependencies during development #3646 - GitHub
Extras tend to add dependencies, like 'dev' does now, but similarly to 'dev', they may flow through into modifying dependencies, e.g., I create...
Read more >
Commands | Documentation | Poetry - Python dependency ...
This command will help you kickstart your new Python project by creating a directory structure suitable for most projects. poetry new my-package. will...
Read more >
Dependency Management With Python Poetry
Learn how Python Poetry will help you start new projects, maintain existing ones, and master dependency management.
Read more >
How can I make my project available in the poetry environment?
There are two things needed, that the package under development is available in the venv. First, poetry must be able to find the...
Read more >
pyflow - crates.io: Rust Package Registry
Actively managing Python environments shouldn't be required to use ... Pipenv , Poetry , and Pyenv address parts of Pyflow's raison d'être, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found