Commit a3b648ba by Sébastien Eustace Committed by GitHub

Fix root package and directory dependency editable installation (#2505)

parent 6ea3849b
......@@ -181,7 +181,6 @@ class PipInstaller(BaseInstaller):
def install_directory(self, package):
from poetry.factory import Factory
from poetry.utils.env import NullEnv
from poetry.utils.toml_file import TomlFile
if package.root_dir:
......@@ -215,7 +214,7 @@ class PipInstaller(BaseInstaller):
from poetry.masonry.builders.editable import EditableBuilder
builder = EditableBuilder(
Factory().create_poetry(pyproject.parent), NullEnv(), NullIO()
Factory().create_poetry(pyproject.parent), self._env, NullIO()
)
builder.build()
......
......@@ -38,7 +38,7 @@ class EditableBuilder(Builder):
str(self._poetry.file), str(self._poetry.file.with_suffix(".tmp"))
)
try:
self._env.run_pip("install", "-e", str(self._path))
self._env.run_pip("install", "--no-deps", "-e", str(self._path))
finally:
shutil.move(
str(self._poetry.file.with_suffix(".tmp")),
......
......@@ -38,7 +38,9 @@ def test_build_should_temporarily_remove_the_pyproject_file(tmp_dir, mocker):
builder = EditableBuilder(Factory().create_poetry(module_path), env, NullIO())
builder.build()
expected = [[sys.executable, "-m", "pip", "install", "-e", str(module_path)]]
expected = [
[sys.executable, "-m", "pip", "install", "--no-deps", "-e", str(module_path)]
]
assert expected == env.executed
assert 2 == move.call_count
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment