mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
Remove quasiPipTempDirectory and use Pips TempDirectory.
This commit is contained in:
@@ -63,16 +63,6 @@ console = rich.console.Console()
|
||||
err = rich.console.Console(stderr=True)
|
||||
|
||||
|
||||
class QuasiPipTempDirectory:
|
||||
"""A fake pip temp directory that is only used to pass path.
|
||||
|
||||
We add this because we can't monkeypatch a string instance.
|
||||
"""
|
||||
|
||||
def __init__(self, path):
|
||||
self.path = path
|
||||
|
||||
|
||||
def get_package_finder(
|
||||
install_cmd=None,
|
||||
options=None,
|
||||
@@ -660,16 +650,14 @@ class Resolver:
|
||||
|
||||
@contextlib.contextmanager
|
||||
def get_resolver(self, clear=False):
|
||||
from tempfile import TemporaryDirectory
|
||||
from pipenv.patched.pip._internal.utils.temp_dir import TempDirectory
|
||||
|
||||
with global_tempdir_manager(), get_build_tracker() as build_tracker, TemporaryDirectory(
|
||||
suffix="-build", prefix="pipenv-"
|
||||
) as directory:
|
||||
with global_tempdir_manager(), get_build_tracker() as build_tracker, TempDirectory() as directory:
|
||||
pip_options = self.pip_options
|
||||
finder = self.finder
|
||||
wheel_cache = WheelCache(pip_options.cache_dir, pip_options.format_control)
|
||||
preparer = self.pip_command.make_requirement_preparer(
|
||||
temp_build_dir=QuasiPipTempDirectory(path=directory),
|
||||
temp_build_dir=directory,
|
||||
options=pip_options,
|
||||
build_tracker=build_tracker,
|
||||
session=self.session,
|
||||
|
||||
Reference in New Issue
Block a user