pyloid 0.18.1__py3-none-any.whl → 0.18.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
pyloid/utils.py
CHANGED
@@ -24,18 +24,23 @@ def get_production_path(path: Optional[str] = None) -> Optional[str]:
|
|
24
24
|
>>> else:
|
25
25
|
>>> print("Not in a production environment.")
|
26
26
|
"""
|
27
|
-
if
|
28
|
-
# Nuitka
|
27
|
+
if is_production():
|
29
28
|
if hasattr(sys, '_MEIPASS'):
|
30
29
|
# PyInstaller
|
31
30
|
base_path = sys._MEIPASS
|
32
31
|
else:
|
33
|
-
# Nuitka
|
34
|
-
base_path =
|
32
|
+
# Nuitka
|
33
|
+
base_path = globals()['__compiled__'].containing_dir
|
34
|
+
|
35
|
+
print(base_path)
|
36
|
+
|
37
|
+
if base_path is None:
|
38
|
+
# 환경변수가 없는 경우 실행 파일 디렉토리 사용
|
39
|
+
base_path = os.path.dirname(os.path.abspath(sys.argv[0]))
|
40
|
+
|
35
41
|
|
36
42
|
return os.path.join(base_path, path) if path else base_path
|
37
43
|
else:
|
38
|
-
# 일반 Python 스크립트로 실행 중일 때
|
39
44
|
return None
|
40
45
|
|
41
46
|
|
@@ -56,7 +61,11 @@ def is_production() -> bool:
|
|
56
61
|
>>> else:
|
57
62
|
>>> print("Not in production environment.")
|
58
63
|
"""
|
59
|
-
|
64
|
+
# Nuitka 환경 확인을 추가
|
65
|
+
if '__compiled__' in globals():
|
66
|
+
return True
|
67
|
+
# PyInstaller 환경 확인
|
68
|
+
return getattr(sys, 'frozen', False)
|
60
69
|
|
61
70
|
|
62
71
|
def get_platform() -> str:
|
@@ -11,8 +11,8 @@ pyloid/pyloid.py,sha256=YKE2a5yZFbBZrtMND2X5I7CVnFRK40NFzDp3kYN-oQg,44091
|
|
11
11
|
pyloid/thread_pool.py,sha256=fKOBb8jMfZn_7crA_fJCno8dObBRZE31EIWaNQ759aw,14616
|
12
12
|
pyloid/timer.py,sha256=RqMsChFUd93cxMVgkHWiIKrci0QDTBgJSTULnAtYT8M,8712
|
13
13
|
pyloid/tray.py,sha256=D12opVEc2wc2T4tK9epaN1oOdeziScsIVNM2uCN7C-A,1710
|
14
|
-
pyloid/utils.py,sha256=
|
15
|
-
pyloid-0.18.
|
16
|
-
pyloid-0.18.
|
17
|
-
pyloid-0.18.
|
18
|
-
pyloid-0.18.
|
14
|
+
pyloid/utils.py,sha256=SomwDO0flG_JvjKpv9PsFDFLSnI0MJYd1h0Px5gjb8Y,3109
|
15
|
+
pyloid-0.18.3.dist-info/LICENSE,sha256=F96EzotgWhhpnQTW2TcdoqrMDir1jyEo6H915tGQ-QE,11524
|
16
|
+
pyloid-0.18.3.dist-info/METADATA,sha256=NlINNeMANDqPlAcDMUaG5TJlq0jZfg4AaXDZ0EzBgyI,3050
|
17
|
+
pyloid-0.18.3.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
18
|
+
pyloid-0.18.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|