Skip to content
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

Local editable packages don't have dependency resolution #151

Open
andyneff opened this issue Jul 3, 2019 · 1 comment
Open

Local editable packages don't have dependency resolution #151

andyneff opened this issue Jul 3, 2019 · 1 comment

Comments

@andyneff
Copy link
Member

andyneff commented Jul 3, 2019

Pipenv doesn't respect the dependencies of local editable packages.

One such solution is to generate a setup.py file that will configure dynamic dependencies.:

This can solve a few problems at once.

  1. The dependencies of local editable packages can be scanned and added to this pipenv_patch package. This will remove the duplicated dependencies in the Pipfile.
    1. Maybe this pipenv_patch can even parse the Pipfile and get the list of editable packages (no recursion search needed for this. Just get the list from reading the Pipfile since dependencies can't be editable unless they are listed there)
    2. This patch will read the setup.py files, and get the list of dependencies from them, and call them its own.
  2. (optional) We can check an environment variable and dynamically add other dependencies based on that. This is to solve pipenv issue 3167. Since the Pipfileallows you to add other sections that are ignored, you could for example have
[foo-packages]
ipykernel = "*"

And the foo packages are parsed only if an environment variable is set to foo. There could also be a [not-foo-packages] too. This will work well for the tensorflow vs tensorflow-gpu scenario. But this whole optional idea might not pan out either.

@scott-vsi

@andyneff
Copy link
Member Author

I may have observed this happening on a local non-editable install of a package too. May just be a local thing. I did not try turning the local package into a wheel and then installing that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant