Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 28, 2022
1 parent 940dd4b commit 6cbe073
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions src/poetry/core/masonry/builders/wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
import shutil
import stat
import subprocess
import sys
import tempfile
import zipfile
import sys

from base64 import urlsafe_b64encode
from io import StringIO
Expand Down Expand Up @@ -185,7 +185,11 @@ def _build(self, wheel: zipfile.ZipFile) -> None:
python_version_minor = sys.version_info[1]
build_dir = self._path / "build"
libs: list[Path] = list(build_dir.glob("lib.*"))
scripts: list[Path] = list(build_dir.glob(f"scripts-{python_version_major}.{python_version_minor}/*"))
scripts: list[Path] = list(
build_dir.glob(
f"scripts-{python_version_major}.{python_version_minor}/*"
)
)
if libs:
lib = libs[0]

Expand All @@ -198,7 +202,7 @@ def _build(self, wheel: zipfile.ZipFile) -> None:
if rel_path in wheel.namelist():
continue

#logger.debug(f"Adding: {rel_path}")
# logger.debug(f"Adding: {rel_path}")
print(f"Adding: {rel_path}")

self._add_file(wheel, pkg, rel_path)
Expand All @@ -210,10 +214,13 @@ def _build(self, wheel: zipfile.ZipFile) -> None:
self._add_file(
wheel,
abs_path,
Path.joinpath(Path(self.wheel_data_folder), "scripts", abs_path.name),
Path.joinpath(
Path(self.wheel_data_folder),
"scripts",
abs_path.name,
),
)


# The result of building the extensions
# does not exist, this may due to conditional
# builds, so we assume that it's okay
Expand Down

0 comments on commit 6cbe073

Please sign in to comment.