Skip to content

Commit 63664d0

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 3a5f385 commit 63664d0

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

src/auditwheel/repair.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
11
from __future__ import annotations
22

3-
from contextlib import ExitStack
43
import itertools
54
import logging
65
import os
76
import platform
87
import re
98
import shutil
109
import stat
11-
from collections.abc import Iterable
10+
from concurrent.futures import Future, ThreadPoolExecutor, as_completed
1211
from fnmatch import fnmatch
1312
from os.path import isabs
1413
from pathlib import Path
1514
from subprocess import check_call
16-
from concurrent.futures import ThreadPoolExecutor, Future, as_completed
1715

1816
from auditwheel.patcher import ElfPatcher
1917

@@ -90,10 +88,12 @@ def repair_wheel(
9088

9189
new_soname, new_path = copylib(src_path, dest_dir, patcher, dry=True)
9290
if not new_path.exists() and str(new_path) not in copy_works:
93-
copy_works[str(new_path)] = pool.submit(copylib, src_path, dest_dir, patcher)
91+
copy_works[str(new_path)] = pool.submit(
92+
copylib, src_path, dest_dir, patcher
93+
)
9494
soname_map[soname] = (new_soname, new_path)
9595
replacements.append((soname, new_soname))
96-
96+
9797
def _inner_replace():
9898
if replacements:
9999
patcher.replace_needed(fn, *replacements)
@@ -127,7 +127,9 @@ def _inner_replace():
127127
ctx.out_wheel = add_platforms(ctx, abis, get_replace_platforms(abis[0]))
128128

129129
if strip:
130-
for lib, future in itertools.chain(copy_works.items(), replace_works.items()):
130+
for lib, future in itertools.chain(
131+
copy_works.items(), replace_works.items()
132+
):
131133
logger.info("Stripping symbols from %s", lib)
132134
then(future, check_call, ["strip", "-s", lib])
133135

@@ -141,7 +143,9 @@ def then(pool: ThreadPoolExecutor, future: Future, *args, **kwargs):
141143
pool.submit(*args, **kwargs)
142144

143145

144-
def copylib(src_path: Path, dest_dir: Path, patcher: ElfPatcher, dry: bool = False) -> tuple[str, Path]:
146+
def copylib(
147+
src_path: Path, dest_dir: Path, patcher: ElfPatcher, dry: bool = False
148+
) -> tuple[str, Path]:
145149
"""Graft a shared library from the system into the wheel and update the
146150
relevant links.
147151

0 commit comments

Comments
 (0)