Revert changes process_skipfiles.py (#1798)

Keeps a small typo fix but reverts the rest of changes to this file from 450c231171
This commit is contained in:
Ean Garvey
2023-08-25 17:31:49 -05:00
committed by GitHub
parent 51f90a4d56
commit 9e348a114e

View File

@@ -6,23 +6,14 @@ from distutils.sysconfig import get_python_lib
import fileinput
from pathlib import Path
# Temporary workaround for transformers/__init__.py.
path_to_stdhooks = Path(
get_python_lib() + "/_pyinstaller_hooks_contrib/hooks/stdhooks"
)
# Temorary workaround for transformers/__init__.py.
path_to_transformers_hook = Path(
str(path_to_stdhooks) + "hook-transformers.py"
get_python_lib()
+ "/_pyinstaller_hooks_contrib/hooks/stdhooks/hook-transformers.py"
)
if path_to_transformers_hook.is_file():
pass
else:
if not path_to_stdhooks.is_dir():
import os
print(
f"Path to pyinstaller stdhooks not found. Please check your pyinstaller packages at {path_to_stdhooks}."
)
os.mkdir(path_to_stdhooks)
with open(path_to_transformers_hook, "w") as f:
f.write("module_collection_mode = 'pyz+py'")