Skip to content

Commit 5c27445

Browse files
authored
Use __name__ argument to get the correct USER_DATA_PATH when in pyinstaller (#1217)
1 parent 364c0af commit 5c27445

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ansys/dpf/core/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
try:
1010
import pkgutil
1111

12-
spec = pkgutil.get_loader("ansys.dpf.core")
13-
USER_DATA_PATH = os.path.dirname(spec.get_filename())
12+
spec = pkgutil.get_loader(__name__)
13+
USER_DATA_PATH = os.path.dirname(spec.get_filename(__name__))
1414
if not os.path.exists(USER_DATA_PATH): # pragma: no cover
1515
os.makedirs(USER_DATA_PATH)
1616

0 commit comments

Comments
 (0)