From 2f8c2b2c2c0215c87bdc9f5a1b2a5c7d6691c29e Mon Sep 17 00:00:00 2001 From: Cameron Hurst Date: Fri, 6 Dec 2019 21:15:48 -0500 Subject: [PATCH] fix: Work around for --no-deps failure in pip works around https://github.com/pypa/pip/issues/7444 resolve #1689 --- poetry/installation/pip_installer.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/poetry/installation/pip_installer.py b/poetry/installation/pip_installer.py index aada0cd0190..4392c61f212 100644 --- a/poetry/installation/pip_installer.py +++ b/poetry/installation/pip_installer.py @@ -181,6 +181,7 @@ def install_directory(self, package): from poetry.utils._compat import decode from poetry.utils.env import NullEnv from poetry.utils.toml_file import TomlFile + from uuid import uuid4 if package.root_dir: req = os.path.join(package.root_dir, package.source_url) @@ -223,8 +224,13 @@ def install_directory(self, package): args.append(req) try: + random_path = os.path.join(req, str(uuid4())) + if pyproject.exists(): + os.rename(os.path.join(req, "pyproject.toml"), random_path) return self.run(*args) finally: + if os.path.exists(random_path): + os.rename(random_path, os.path.join(req, "pyproject.toml")) if not has_setup and os.path.exists(setup): os.remove(setup)