-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
Description
Issue description
This issue was introduced within the PR #5464
The lines:
if not keep_outdated:
try:
del lockfile[category]
except KeyError:
pass
forces the category to be resolved latter. This strips the path
key for local packages which does not get reintroduced into the lockfile later. This causes a cannot resolve package error
during installation despite Pipfile.lock being created.
i.e. the Pipfile.lock for the <LOCAL_PACKAGE>
loses the path.
"<LOCAL_PACKAGE>": {
"hashes": [
"sha256:<VALUE>"
],
"path": "<PATH>"
}
becomes
"<LOCAL_PACKAGE>": {
"hashes": [
"sha256:<VALUE>"
]
}
Expected result
Pipfile.lock should maintain the path
key for locally installed packages.
Actual result
[pipenv.exceptions.InstallError]: ERROR: Could not find a version that satisfies the requirement my-package (from versions: none)
[pipenv.exceptions.InstallError]: ERROR: No matching distribution found for my-package
Steps to replicate
- Create a Pipfile which contains a path to a local package.
e.g.
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"
[packages]
my-package = {path = "./path/to/my-package.whl"}
- Run
pipenv install
$ pipenv --support
Pipenv version: '2022.11.30'
# NOTE: Tested around 2022.11.11 and 2022.11.5 to identify.
Pipenv location: '/usr/local/lib/python3.10/site-packages/pipenv'
Python location: '/usr/local/opt/python@3.10/bin/python3.10'
OS Name: 'posix'
User pip version: '22.3'
user Python installations found:
3.10.8
:/usr/local/bin/python3
3.9.16
:/usr/local/bin/python3.9
3.8.16
:/usr/local/bin/python3.8
Limited output...