Skip to content

Commit

Permalink
Fix root package and directory dependency editable installation (#2505)
Browse files Browse the repository at this point in the history
  • Loading branch information
sdispater authored Jun 5, 2020
1 parent 6ea3849 commit a3b648b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 1 addition & 2 deletions poetry/installation/pip_installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ def create_temporary_requirement(self, package):

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:
Expand Down Expand Up @@ -215,7 +214,7 @@ def install_directory(self, package):
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()
Expand Down
2 changes: 1 addition & 1 deletion poetry/masonry/builders/editable.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def _setup_build(self):
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")),
Expand Down
4 changes: 3 additions & 1 deletion tests/masonry/builders/test_editable.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a3b648b

Please sign in to comment.