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.

Pipenv can't find setup.py in dependency with subdirectory

See original GitHub issue

Issue description

One of our projects has a dependency on a private git repo. The dependency is in a subdirectory of that repo, which is a monorepo. The dependency is specified in the Pipfile like this:

mypackage = {editable = true, subdirectory = "mypackage", git = "ssh://git@github.com/myorg/myrepo.git"}

Expected result

The repo should be cloned, and pipenv should execute the setup.py in the subdirectory of the repo. I have confirmed this is the case in the following versions of pipenv:

  • 2018.05.18
  • 2018.7.1

Actual result

Pipenv tries to execute python setup.py ... in the root of the dependency, rather than in the subdirectory as expected. Installing the same dependency using the latest version of pip directly still works. I verified that this issue was introduced in pipenv==2018.10.9.

Steps to replicate

  1. Create a git repo with a Python package in a subdirectory of the repo. The subdirectory should contain a setup.py, but the root of the repo should not.
  2. Create a second Python package with a dependency on the package from step 1, as per the above Pipfile config.
  3. Run pipenv install and note that the installation of the dependency fails because pipenv looks for setup.py in the root of the cloned repo, rather than in the subdirectory.

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
techalchemycommented, Oct 22, 2018

Thanks guys I think I have a fix, having a testable example was super helpful

0reactions
wolphcommented, Oct 30, 2018

Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

how can I get pipenv to install package sub dependencies
When installing with pipenv, I have access to B (sg_wrapper), but B itself fails to import C. This is my pipfile [[source]] name...
Read more >
Advanced Usage of Pipenv - Python Packaging Authority
Pipenv allows you to open any Python module that is installed (including ones in your codebase), with the $ pipenv open command: $...
Read more >
What's wrong with pipenv? I am genuinely curious. On local
I was trying out pipenv last week and running `pipenv run script.py` in a subdirectory printed a message along the lines of "Courtesy...
Read more >
Dependency Management With Python Poetry
Install dependencies with poetry.lock; Execute basic Poetry CLI commands. Using Poetry will help you start new projects, maintain existing ones, ...
Read more >
pipenv Documentation - Read the Docs
Will create a virtual env and install dependencies (if it does not exist ... On Windows you can find the user base binary...
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