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

-e install uses remote Git repo instead of local files #4300

Closed
chris-hailstorm opened this issue Feb 22, 2017 · 5 comments
Closed

-e install uses remote Git repo instead of local files #4300

chris-hailstorm opened this issue Feb 22, 2017 · 5 comments
Labels
auto-locked Outdated issues that have been locked by automation C: editable Editable installations C: freeze 'pip freeze' related

Comments

@chris-hailstorm
Copy link

  • Pip version: 9.0.1
  • Python version: 2.7.12
  • Operating system: OSX

Description:

Attempting to create a local / editable install.

Although the project also exists on Bitbucket, reference local files, NOT remote Git repo

What I've run:

## before
pip freeze | grep clickplus
(no output)

workon project1
cd /path/to/project2/package
pip install -e .

pip install -e .
Obtaining file:///Users/chris/proj/clickplus/python-modules/clickplus-pkg
  Running setup.py (path:/Users/chris/proj/clickplus/python-modules/clickplus-pkg/setup.py) egg_info for package from file:///Users/chris/proj/clickplus/python-modules/clickplus-pkg
    Running command python setup.py egg_info
    req: ['arrow>=0.10.0', 'astroid==1.4.9', 'backports-abc==0.4', 'backports.functools-lru-cache==1.3', 'backports.ssl-match-hostname==3.5.0.1', 'certifi==2016.8.2', 'click>=6.6', 'configparser==3.5.0', 'isort==4.2.5', 'Jinja2>=2.8', 'lazy-object-proxy==1.2.2', 'py==1.4.32', 'python-dateutil>=2.6.0', 'PyYAML>=3.12', 'singledispatch==3.4.0.3', 'six==1.10.0', 'uuid>=1.30', 'wrapt==1.10.8', 'setuptools>=18.0']
    dep: []
    running egg_info
    writing requirements to clickplus.egg-info/requires.txt
    writing clickplus.egg-info/PKG-INFO
    writing namespace_packages to clickplus.egg-info/namespace_packages.txt
    writing top-level names to clickplus.egg-info/top_level.txt
    writing dependency_links to clickplus.egg-info/dependency_links.txt
    reading manifest file 'clickplus.egg-info/SOURCES.txt'
    writing manifest file 'clickplus.egg-info/SOURCES.txt'
  Source in /Users/chris/proj/clickplus/python-modules/clickplus-pkg has version 1.0.8, which satisfies requirement clickplus==1.0.8 from file:///Users/chris/proj/clickplus/python-modules/clickplus-pkg
Requirement already satisfied: arrow>=0.10.0 in /Users/chris/.virtualenvs/storelabels/lib/python2.7/site-packages (from clickplus==1.0.8)
Requirement already satisfied: astroid==1.4.9 in /Users/chris/.virtualenvs/storelabels/lib/python2.7/site-packages (from clickplus==1.0.8)
Requirement already satisfied: backports-abc==0.4 in /Users/chris/.virtualenvs/storelabels/lib/python2.7/site-packages (from clickplus==1.0.8)
Requirement already satisfied: backports.functools-lru-cache==1.3 in /Users/chris/.virtualenvs/storelabels/lib/python2.7/site-packages (from clickplus==1.0.8)
Requirement already satisfied: backports.ssl-match-hostname==3.5.0.1 in /Users/chris/.virtualenvs/storelabels/lib/python2.7/site-packages (from clickplus==1.0.8)
Requirement already satisfied: certifi==2016.8.2 in /Users/chris/.virtualenvs/storelabels/lib/python2.7/site-packages (from clickplus==1.0.8)
Requirement already satisfied: click>=6.6 in /Users/chris/.virtualenvs/storelabels/lib/python2.7/site-packages (from clickplus==1.0.8)
Requirement already satisfied: configparser==3.5.0 in /Users/chris/.virtualenvs/storelabels/lib/python2.7/site-packages (from clickplus==1.0.8)
Requirement already satisfied: isort==4.2.5 in /Users/chris/.virtualenvs/storelabels/lib/python2.7/site-packages (from clickplus==1.0.8)
Requirement already satisfied: Jinja2>=2.8 in /Users/chris/.virtualenvs/storelabels/lib/python2.7/site-packages (from clickplus==1.0.8)
Requirement already satisfied: lazy-object-proxy==1.2.2 in /Users/chris/.virtualenvs/storelabels/lib/python2.7/site-packages (from clickplus==1.0.8)
Requirement already satisfied: py==1.4.32 in /Users/chris/.virtualenvs/storelabels/lib/python2.7/site-packages (from clickplus==1.0.8)
Requirement already satisfied: python-dateutil>=2.6.0 in /Users/chris/.virtualenvs/storelabels/lib/python2.7/site-packages (from clickplus==1.0.8)
Requirement already satisfied: PyYAML>=3.12 in /Users/chris/.virtualenvs/storelabels/lib/python2.7/site-packages (from clickplus==1.0.8)
Requirement already satisfied: singledispatch==3.4.0.3 in /Users/chris/.virtualenvs/storelabels/lib/python2.7/site-packages (from clickplus==1.0.8)
Requirement already satisfied: six==1.10.0 in /Users/chris/.virtualenvs/storelabels/lib/python2.7/site-packages (from clickplus==1.0.8)
Requirement already satisfied: uuid>=1.30 in /Users/chris/.virtualenvs/storelabels/lib/python2.7/site-packages (from clickplus==1.0.8)
Requirement already satisfied: wrapt==1.10.8 in /Users/chris/.virtualenvs/storelabels/lib/python2.7/site-packages (from clickplus==1.0.8)
Requirement already satisfied: setuptools>=18.0 in /Users/chris/.virtualenvs/storelabels/lib/python2.7/site-packages (from clickplus==1.0.8)
Requirement already satisfied: MarkupSafe>=0.23 in /Users/chris/.virtualenvs/storelabels/lib/python2.7/site-packages (from Jinja2>=2.8->clickplus==1.0.8)
Requirement already satisfied: packaging>=16.8 in /Users/chris/.virtualenvs/storelabels/lib/python2.7/site-packages (from setuptools>=18.0->clickplus==1.0.8)
Requirement already satisfied: appdirs>=1.4.0 in /Users/chris/.virtualenvs/storelabels/lib/python2.7/site-packages (from setuptools>=18.0->clickplus==1.0.8)
Requirement already satisfied: pyparsing in /Users/chris/.virtualenvs/storelabels/lib/python2.7/site-packages (from packaging>=16.8->setuptools>=18.0->clickplus==1.0.8)
Installing collected packages: clickplus
  Running setup.py develop for clickplus
    Running command /Users/chris/.virtualenvs/storelabels/bin/python2.7 -c "import setuptools, tokenize;__file__='/Users/chris/proj/clickplus/python-modules/clickplus-pkg/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" develop --no-deps
    req: ['arrow>=0.10.0', 'astroid==1.4.9', 'backports-abc==0.4', 'backports.functools-lru-cache==1.3', 'backports.ssl-match-hostname==3.5.0.1', 'certifi==2016.8.2', 'click>=6.6', 'configparser==3.5.0', 'isort==4.2.5', 'Jinja2>=2.8', 'lazy-object-proxy==1.2.2', 'py==1.4.32', 'python-dateutil>=2.6.0', 'PyYAML>=3.12', 'singledispatch==3.4.0.3', 'six==1.10.0', 'uuid>=1.30', 'wrapt==1.10.8', 'setuptools>=18.0']
    dep: []
    running develop
    running egg_info
    writing requirements to clickplus.egg-info/requires.txt
    writing clickplus.egg-info/PKG-INFO
    writing namespace_packages to clickplus.egg-info/namespace_packages.txt
    writing top-level names to clickplus.egg-info/top_level.txt
    writing dependency_links to clickplus.egg-info/dependency_links.txt
    reading manifest file 'clickplus.egg-info/SOURCES.txt'
    writing manifest file 'clickplus.egg-info/SOURCES.txt'
    running build_ext
    Creating /Users/chris/.virtualenvs/storelabels/lib/python2.7/site-packages/clickplus.egg-link (link to .)
    Adding clickplus 1.0.8 to easy-install.pth file

    Installed /Users/chris/proj/clickplus/python-modules/clickplus-pkg
Successfully installed clickplus
Cleaning up...

## after
pip freeze | grep clickplus
-e git+ssh://git@bitbucket.org/eloquii/clickplus.git@eabb6f04ccf403d843b337395af810be8d3dab0d#egg=clickplus&subdirectory=python-modules/clickplus-pkg

cdsiteppackages
cat clickplus.egg-link 
/Users/chris/proj/clickplus/python-modules/clickplus-pkg

The egg-link info is correct. The pip freeze output is not -- references a remote repo that wasn't part of the pip install command and was not involved in the pip install log output. Is it possible pip freeze has some leakage and is reporting what could be set up in a different virtualenv?

@RonnyPfannschmidt
Copy link
Contributor

AFAIK thats pip freeze being smart about being reusable in other places

@chris-hailstorm
Copy link
Author

In my opinion that's a bit too smart. If the user installs from a local resource, it's not right to silently map that to a remote resource. The user may not have access to the remote resource, or there may be availability / caching concerns. The user will choose the resource for the install. The desired output from pip freeze is, a representation of what the user invoked in the pip install phase. Whether a project has an associated Git repository or not should not change this behavior.

@RonnyPfannschmidt
Copy link
Contributor

i suspect someone contributed this behavior because it was a net win for them

the real problem is, that its hard to tell from a editable checkout, if pip made it, or a local user

for requirement files that get frozen it tends to be more beneficial to use the remote repo as it allows other users to just use that file even when all their folders are somewhere else

@dstufft
Copy link
Member

dstufft commented Mar 31, 2017

Closing this, there's not much we can do here as a git checkout that was pip installed as a path is indistinguishable from a git checkout that was pip installed as a git clone

@lock
Copy link

lock bot commented May 29, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label May 29, 2019
@lock lock bot locked as resolved and limited conversation to collaborators May 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation C: editable Editable installations C: freeze 'pip freeze' related
Projects
None yet
Development

No branches or pull requests

4 participants