8000 Merge pull request #1517 from stonebig/master · winpython/winpython@f10f603 · GitHub
[go: up one dir, main page]

Skip to content

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f10f603

Browse files
authored
Merge pull request #1517 from stonebig/master
walrus a bit
2 parents d679179 + 6e7d16b commit f10f603

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

make.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ def find_7zip_executable() -> str:
3434
Path(sys.prefix).parent / "t" ,
3535
]
3636
for base_dir in possible_program_files:
37-
executable_path = base_dir / "7-Zip" / "7z.exe"
38-
if executable_path.is_file():
37+
if (executable_path := base_dir / "7-Zip" / "7z.exe").is_file():
3938
return str(executable_path)
4039
raise RuntimeError("7ZIP is not installed on this computer.")
4140

@@ -180,9 +179,8 @@ def __init__(
180179

181180
def _get_python_zip_file(self) -> Path:
182181
"""Finds the Python .zip file in the wheels directory."""
183-
pattern = r"(pypy3|python-)([0-9]|[a-zA-Z]|.)*.zip"
184182
for filename in os.listdir(self.wheels_directory):
185-
if re. 8000 match(pattern, filename):
183+
if re.match("(pypy3|python-)([0-9]|[a-zA-Z]|.)*.zip", filename):
186184
return self.wheels_directory / filename
187185
raise RuntimeError(f"Could not find Python zip package in {self.wheels_directory}")
188186

@@ -305,8 +303,7 @@ def pre_path_entries(self) -> list[str]:
305303
@property
306304
def documentation_directories_list(self) -> list[Path]:
307305
"""Returns the list of documentation directories to include."""
308-
default_docs_directory = Path(__file__).resolve().parent / "docs"
309-
if default_docs_directory.is_dir():
306+
if (default_docs_directory := Path(__file__).parent / "docs").is_dir():
310307
return [default_docs_directory] + self.documentation_directories
311308
return self.documentation_directories
312309

@@ -371,7 +368,7 @@ def _copy_essential_files(self):
371368

372369
tools_target_directory = self.winpython_directory / "t"
373370
self._print_action(f"Copying tools to {tools_target_directory}")
374-
_copy_items(self.tools_directories, self.winpython_directory / "t", self.verbose)
371+
_copy_items(self.tools_directories, tools_target_directory, self.verbose)
375372 4568

376373
# Special handling for Node.js to move it up one level
377374
nodejs_current_directory = tools_target_directory / "n"

0 commit comments

Comments
 (0)
0