-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Pipfile adds incorrect entry for package with local identifier, possibly leading to bad residual dist-info in site-packages #3612
Comments
I've experimented with the local identifier some more and have found some strange results: setup.py name field: company.app.tools.cool_tool setup.py version field: 1.0.0+local.1234567 setup.py version field: 1.0.0+local#1234567 (invalid version warning when building) setup.py version field: 1.0.0+local-1234567 setup.py version field: 1.0.0+local1234567 It also seems to randomly work sometimes, but all of my recent tests have failed when using a local identifier... |
I think I finally understand what is going on a little better:
However, because the name entry in the Pipfile is wrong, it leads to issues with uninstalling the local development version and changing back to a package that has been deployed via a pypi server. I think this also ties in to the strange residual "dist-info" files that seem to appear occasionally. |
@ipstech From your conclusion, I wanna know the result of below commands.
I don't know what leads to the failure but the Pipfile entry is just correct when I install from a local repo. |
That directory name looks like it is a temporary directory created by pip when it tries to uninstall or update a package. See pypa/pip#6327. |
Issue description
Our internal package build system uses the following PEP 440 compliant (as far as I can tell) versioning scheme for local package builds:
major.minor.patch+local.########
1.0.1+local.5d8761t
5.2.0+local.99e45qw
When such a package is built and installed directly from a git repo, it installs correctly, and
pipenv graph
(as well aspip list
) displays the correct version, however, the entry in thePipfile
lists the package entry as just the hash value:[packages]
...
5d8761t = {path = "/local/path/to/project/repo"}
...
This breaks some
pipenv
commands, since the package is not listed by its actual name. It also seems like it might be related to some odd residual dist-info files that end up in the site-packages directory sometimes (possibly after runningpipenv update
):~ompany.app.tools.cool_tool-1.2.0+local.a41e1e8.dist-info
(the "~" chops off the first character, and
pipenv graph
shows this file with a "-" instead of a tilde)The properly installed version of the above package would look like this:
company.app.tools.cool_tool-1.2.0+local.a41e1e8.dist-info
Expected result
I would expect the package name logged in the Pipfile to be accurate to the actual name of the package.
Actual result
Described above.
Steps to replicate
Create a package where the version follows the scheme described above and try to install it via pipenv.
$ pipenv --support
Pipenv version:
'2018.11.27.dev0'
Pipenv location:
'/usr/local/lib/python2.7/site-packages/pipenv'
Python location:
'/usr/local/opt/python@2/bin/python2.7'
PEP 508 Information:
Pipenv–specific environment variables:
PIPENV_VENV_IN_PROJECT
:1
Debug–specific environment variables:
SHELL
:/usr/local/bin/bash
EDITOR
:nvim
LANG
:en_US.UTF-8
The text was updated successfully, but these errors were encountered: