Pipenv: Master incorrectly installs VCS dependency as editable

Created on 25 Mar 2019  Β·  8Comments  Β·  Source: pypa/pipenv

This only happens in master, not latest stable.

Lock file (partial):

{
    "default": {
        "mypackage": {
            "git": "https://github.com/me/mypackage.git",
            "ref": "5e0042953dc91d5121f2e6960a4b063ac02b9a2c"
        }
    }
}

With v2018.11.26:

$ pipenv install
Installing dependencies from Pipfile.lock (a69852)…
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.

$ ls -d .venv/lib/*/site-packages/mypackage*
.venv/lib/python3.7/site-packages/mypackage
.venv/lib/python3.7/site-packages/mypackage-0.1.0.dist-info

But with master:

$ pipenv sync
Installing dependencies from Pipfile.lock (a69852)…
Writing requirement line to temporary file: '-e file:///var/folders/sg/5486g341789bflp89sn_3qcc0000gn/T/requirementslib8k0h6371/fatek#egg=fatek'
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.

$ ls -d .venv/lib/*/site-packages/mypackage*
.venv/lib/python3.7/site-packages/mypackage.egg-link

$ cat .venv/lib/python3.7/site-packages/mypackage.egg-link
/private/var/folders/sg/5486g341789bflp89sn_3qcc0000gn/T/requirementslibzdcz6kx8/mypackage/src
../
Release Blocker

Most helpful comment

It looks like that this is not fixed in the latest master. Reported scenario is still same.

All 8 comments

Not too surprising. The logic underlying this is very disorganized and messy now and needs to be cleaned up (pipenv/core.py:pip_install)

To what commit do I have to go back to get rid of that issue?

@adonig I am not sure, you’ll need to git bisect to find out. I am only certain that the last release tag does not have the problem (git checkout v2018.11.26).

@uranusjr Thank you.

I have same problem with editable on actual master. With pipenv sync concretely.

Lock:

        ...
        "django-db-constraints": {
            "editable": true,
            "git": "https://github.com/rrauenza/django-db-constraints.git",
            "ref": "68c154c7ce13ca66dc7ccef0378e30ae59a583cd",
            "version": "==0.3.0a0"
        },
        ...

With v2018.11.26:

$ cat ../venv/lib/python3.5/site-packages/django-db-constraints.egg-link 
/home/petr/python/django/mp/venv/src/django-db-constraints
.

Master:

$ pipenv sync --dev
Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project. You can set PIPENV_IGNORE_VIRTUALENVS=1 to force pipenv to ignore that environment and create its own instead. You can set PIPENV_VERBOSITY=-1 to suppress this warning.
Installing dependencies from Pipfile.lock (cabbf0)…
An error occurred while installing django-reversion==2.0.11 --hash=sha256:7d201aebcccd1e09d981d18c3b85727be47e989858f4269b2e0d34aebc2f192e! Will try again.
  🐍   β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰ 148/148 β€” 00:00:49
Installing initially failed dependencies…
  ☀  β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰β–‰ 1/1 β€” 00:00:01
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.
All dependencies are now up-to-date!

$ cat ../venv_master/lib/python3.5/site-packages/django-db-constraints.egg-link 
/tmp/requirementslibezb4bg6e/django-db-constraints
.

It looks like that none of "editable": true packages is installed into virtual src directory at all. All have been cloned into tmp and then removed. And *.egg-links are poiting to tmp.

It looks like that this is not fixed in the latest master. Reported scenario is still same.

Can this issue be re-opened, please? I can confirm that it (or a very similar bug) is not fixed.

There is new issue for that #3809.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

leileigong picture leileigong  Β·  3Comments

jeyraof picture jeyraof  Β·  3Comments

hynek picture hynek  Β·  3Comments

jerzyk picture jerzyk  Β·  3Comments

AkiraSama picture AkiraSama  Β·  3Comments