Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix editable installations using setup.py. #335

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/poetry/core/masonry/builders/wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def _build(self, wheel: zipfile.ZipFile) -> None:

build_dir = self._path / "build"
lib = list(build_dir.glob("lib.*"))
if not lib:
if self._editable or not lib:
# The result of building the extensions
# does not exist, this may due to conditional
# builds, so we assume that it's okay
Expand Down Expand Up @@ -201,6 +201,15 @@ def _copy_file_scripts(self, wheel: zipfile.ZipFile) -> None:
)

def _run_build_command(self, setup: Path) -> None:
if self._editable:
subprocess.check_call(
[
self.executable.as_posix(),
str(setup),
"build_ext",
"--inplace",
]
)
subprocess.check_call(
[
self.executable.as_posix(),
Expand Down