Skip to content

Commit

Permalink
respect build requirements at poetry install
Browse files Browse the repository at this point in the history
  • Loading branch information
dimbleby committed May 20, 2023
1 parent c5d2c6b commit 3ac6c6d
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/poetry/masonry/builders/editable.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,16 +101,7 @@ def _setup_build(self) -> None:
f.write(decode(builder.build_setup()))

try:
if self._env.pip_version < Version.from_parts(19, 0):
pip_install(self._path, self._env, upgrade=True, editable=True)
else:
# Temporarily rename pyproject.toml
renamed_pyproject = self._poetry.file.path.with_suffix(".tmp")
self._poetry.file.path.rename(renamed_pyproject)
try:
pip_install(self._path, self._env, upgrade=True, editable=True)
finally:
renamed_pyproject.rename(self._poetry.file.path)
pip_install(self._path, self._env, upgrade=True, editable=True)
finally:
if not has_setup:
os.remove(setup)
Expand Down

0 comments on commit 3ac6c6d

Please sign in to comment.