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

Add support for pip==23.1 where deprecated --install-option has been removed #1828

Merged
merged 1 commit into from
Mar 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion piptools/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from pip._vendor.packaging.version import Version
from pip._vendor.pkg_resources import Distribution, Requirement, get_distribution

from piptools._compat import PIP_VERSION
from piptools.subprocess_utils import run_python_snippet

_KT = TypeVar("_KT")
Expand Down Expand Up @@ -456,7 +457,6 @@ def copy_install_requirement(
"markers": template.markers,
"use_pep517": template.use_pep517,
"isolated": template.isolated,
"install_options": template.install_options,
"global_options": template.global_options,
"hash_options": template.hash_options,
"constraint": template.constraint,
Expand All @@ -465,6 +465,9 @@ def copy_install_requirement(
}
kwargs.update(extra_kwargs)

if PIP_VERSION[:2] <= (23, 0):
kwargs["install_options"] = template.install_options

# Original link does not belong to install requirements constructor,
# pop it now to update later.
original_link = kwargs.pop("original_link", None)
Expand Down