Skip to content

Commit

Permalink
Add compatibility for refactored Resolver
Browse files Browse the repository at this point in the history
  • Loading branch information
atugushev committed Sep 17, 2019
1 parent 3990cd9 commit 4685eec
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions piptools/repositories/pypi.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import hashlib
import os
from contextlib import contextmanager
from functools import partial
from shutil import rmtree

from .._compat import (
Expand Down Expand Up @@ -200,10 +201,20 @@ def resolve_reqs(self, download_dir, ireq, wheel_cache):
"ignore_dependencies": False,
"ignore_requires_python": False,
"ignore_installed": True,
"isolated": False,
"wheel_cache": wheel_cache,
"use_user_site": False,
}
make_install_req_kwargs = {"isolated": False, "wheel_cache": wheel_cache}

if PIP_VERSION < (19, 3):
resolver_kwargs.update(**make_install_req_kwargs)
else:
from pip._internal.req.constructors import install_req_from_req_string

make_install_req = partial(
install_req_from_req_string, **make_install_req_kwargs
)
resolver_kwargs["make_install_req"] = make_install_req

resolver = None
preparer = None
with RequirementTracker() as req_tracker:
Expand Down

0 comments on commit 4685eec

Please sign in to comment.