-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Closed
Labels
C: list/show'pip list' or 'pip show''pip list' or 'pip show'auto-lockedOutdated issues that have been locked by automationOutdated issues that have been locked by automationstate: awaiting PRFeature discussed, PR is neededFeature discussed, PR is neededtype: bugA confirmed bug or unintended behaviorA confirmed bug or unintended behavior
Description
Environment
- pip version: 19.0 or later (I didn’t test earlier versions)
- Python version: any
- OS: any
Description
From pypa/pipx#365. The result list would either include the package in the working directory or not, depending on how pip is invoked.
pip listwould not contain the package in cwd.python -m pip listwould contain the package in cwd.
Expected behavior
The behaviour should be the same no matter how pip is invoked. Ideally the package in cwd should not be included (unless the package is also in sys.path other than .).
How to Reproduce
Create package metadata in cwd:
mkdir foo
cd foo
echo "from setuptools import setup; setup(name='foo', version='1.0.0')" > setup.py
python setup.py egg_info
Output
$ pip list
Package Version
---------- -------
pip 19.0.3
setuptools 40.8.0
$ python -m pip list
Package Version
---------- -------
foo 1.0.0
pip 19.0.3
setuptools 40.8.0
cs01, rokroskar and gutsytechster
Metadata
Metadata
Assignees
Labels
C: list/show'pip list' or 'pip show''pip list' or 'pip show'auto-lockedOutdated issues that have been locked by automationOutdated issues that have been locked by automationstate: awaiting PRFeature discussed, PR is neededFeature discussed, PR is neededtype: bugA confirmed bug or unintended behaviorA confirmed bug or unintended behavior