Skip to content

Commit 8d8beac

Browse files
authored
Merge pull request #51 from apple1417/master
re-add _pth file
2 parents f440ac9 + 28c0fff commit 8d8beac

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

changelog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@
6060
6161
> - Made the error message when assigning incompatible array types more clear.
6262
> See also https://github.com/bl-sdk/unrealsdk/issues/60 .
63+
>
64+
> - Fixed checking the setting `exe_override` rather than the full `unrealsdk.exe_override`, like
65+
> how it was documented / originally intended.
66+
>
67+
> [3010f486](https://github.com/bl-sdk/unrealsdk/commit/3010f486)
6368
6469
### Willow2 Mod Menu v3.4
6570
- Fixed that some keybinds would not be displayed properly if there were two separate grouped/nested

libs/pyunrealsdk

prepare_release.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,18 @@ def _zip_dlls(zip_file: ZipFile, install_dir: Path) -> None:
285285

286286
zip_file.write(file, dest)
287287

288+
# We're adding a '._pth' file which is equivalent to the default. For most people, this doesn't
289+
# do anything. However, if someone has a global `PYTHONPATH`/`PYTHONHOME` env var, without this
290+
# file the interpreter would try use them instead.
291+
py_stem = next(install_dir.glob("python*.zip")).stem
292+
zip_file.writestr(
293+
str(ZIP_PLUGINS_FOLDER / (py_stem + "._pth")),
294+
(
295+
f"{py_stem}.zip\n" # dummy comment to force multiline
296+
"DLLs\n"
297+
),
298+
)
299+
288300

289301
def zip_release(
290302
output: Path,

0 commit comments

Comments
 (0)