Skip to content

Commit e848d30

Browse files
author
Alan
committed
Changed utils.py to work on Mac - pkg_resources changes in 1.2.0rc1 failed on Mac installation.
1 parent 15e233a commit e848d30

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

openroast/utils.py

+4
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ def get_resource_filename(resname):
1515
# if os.path.exists(path):
1616
# return path
1717
if hasattr(sys, "frozen"):
18+
path = os.path.dirname(os.path.abspath(__file__))
19+
path = os.path.join(path,resname)
20+
if os.path.exists(path):
21+
return path
1822
exe_path = sys.executable
1923
if not isinstance(exe_path, str):
2024
exe_path = str(exe_path,sys.getfilesystemencoding())

0 commit comments

Comments
 (0)