mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
Resolve mutiple categories.
This commit is contained in:
@@ -1079,6 +1079,7 @@ def do_lock(
|
||||
packages,
|
||||
which=project._which,
|
||||
project=project,
|
||||
category=category,
|
||||
dev=is_dev,
|
||||
clear=clear,
|
||||
pre=pre,
|
||||
|
||||
@@ -942,6 +942,7 @@ def venv_resolve_deps(
|
||||
deps,
|
||||
which,
|
||||
project,
|
||||
category,
|
||||
pre=False,
|
||||
clear=False,
|
||||
allow_global=False,
|
||||
@@ -977,18 +978,22 @@ def venv_resolve_deps(
|
||||
"""
|
||||
from pipenv import resolver
|
||||
|
||||
results = []
|
||||
pipfile_section = "dev-packages" if dev else "packages"
|
||||
lockfile_section = "develop" if dev else "default"
|
||||
if category == "dev-packages":
|
||||
lockfile_section = "develop"
|
||||
elif category == "packages":
|
||||
lockfile_section = "default"
|
||||
else:
|
||||
lockfile_section = category
|
||||
|
||||
if not deps:
|
||||
if not project.pipfile_exists:
|
||||
return None
|
||||
deps = project.parsed_pipfile.get(pipfile_section, {})
|
||||
deps = project.parsed_pipfile.get(category, {})
|
||||
if not deps:
|
||||
return None
|
||||
|
||||
if not pipfile:
|
||||
pipfile = getattr(project, pipfile_section, {})
|
||||
pipfile = getattr(project, category, {})
|
||||
if not lockfile:
|
||||
lockfile = project._lockfile
|
||||
req_dir = create_tracked_tempdir(prefix="pipenv", suffix="requirements")
|
||||
|
||||
Reference in New Issue
Block a user