Skip to content

Commit

Permalink
fix: fix pkg import issues for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
txperl committed Sep 9, 2024
1 parent 6c9f1b9 commit 2565677
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
5 changes: 1 addition & 4 deletions .pkg/py-pkger.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,7 @@ def run_script(self, pathname):
oargs.append(f"--add-data {ori[1:]}{BET}{dest[1:]}")
# 分析动态加载文件中所使用的包
if x[2] == "py":
try:
finder.run_script(x[0])
except:
continue
finder.run_script(x[0])
for name, mod in finder.modules.items():
module = name.split(".")[0] if os.name == "nt" else name
if module[0] == "_" and module[1:] in hiddenImport:
Expand Down
3 changes: 3 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
from altfe import bridge, handle
from altfe.interface.root import classRoot

# To fix pyinstaller package issues
from PIL import Image

rootPath = os.path.split(os.path.realpath(sys.argv[0]))[0] + "/"
rootPathFrozen = sys._MEIPASS + "/" if getattr(sys, "frozen", False) else rootPath

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ importlib-metadata==6.7.0
itsdangerous==2.1.2
Jinja2==3.1.4
MarkupSafe==2.1.5
Pillow==9.5.0
Pillow==10.4.0
pixivpy3==3.7.5
pyparsing==3.1.4
PySocks==1.7.1
Expand Down

0 comments on commit 2565677

Please sign in to comment.