pyloid 0.18.2__tar.gz → 0.18.3__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyloid
3
- Version: 0.18.2
3
+ Version: 0.18.3
4
4
  Summary:
5
5
  Author: aesthetics-of-record
6
6
  Author-email: 111675679+aesthetics-of-record@users.noreply.github.com
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "pyloid"
3
- version = "0.18.2"
3
+ version = "0.18.3"
4
4
  description = ""
5
5
  authors = ["aesthetics-of-record <111675679+aesthetics-of-record@users.noreply.github.com>"]
6
6
  readme = "README.md"
@@ -25,17 +25,22 @@ def get_production_path(path: Optional[str] = None) -> Optional[str]:
25
25
  >>> print("Not in a production environment.")
26
26
  """
27
27
  if is_production():
28
- # Nuitka
29
28
  if hasattr(sys, '_MEIPASS'):
30
29
  # PyInstaller
31
30
  base_path = sys._MEIPASS
32
31
  else:
33
- # Nuitka의 경우 실행 파일이 있는 디렉토리를 기준으로 함
34
- base_path = os.path.dirname(os.path.abspath(sys.argv[0]))
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
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes