drap 0.0.3.post9__tar.gz → 0.0.3.post11__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: drap
3
- Version: 0.0.3.post9
3
+ Version: 0.0.3.post11
4
4
  Summary: Tool for analyzing droplet size and concentration using video and EDF images
5
5
  Author-email: "Gabriel Braga Marques Teobaldo, Oleg Prymak, Natalie Wolff, Matthias Epple, Marco Aurélio Brizzotti Andrade, Cássio Alves and Cristiano Luis Pinto de Oliveira" <alves.casssio@gmail.com>
6
6
  License: MIT
@@ -36,7 +36,7 @@ Install:
36
36
 
37
37
  python -m venv venv
38
38
 
39
- source venv/bin/activate
39
+ source venv/bin/activate (Linux) or venv\Scripts\activate (windows)
40
40
 
41
41
  pip install drap
42
42
 
@@ -15,7 +15,7 @@ Install:
15
15
 
16
16
  python -m venv venv
17
17
 
18
- source venv/bin/activate
18
+ source venv/bin/activate (Linux) or venv\Scripts\activate (windows)
19
19
 
20
20
  pip install drap
21
21
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "drap"
7
- version = "0.0.3.post9"
7
+ version = "0.0.3.post11"
8
8
  description = "Tool for analyzing droplet size and concentration using video and EDF images"
9
9
  readme = "README.md"
10
10
  license = {text = "MIT"}
@@ -0,0 +1,39 @@
1
+ import os, sys
2
+ from typing import Optional
3
+ from PyQt5.QtCore import QLibraryInfo, QCoreApplication
4
+
5
+ def fix_qt_plugin_paths(prefer_platform: Optional[str] = None) -> None:
6
+ # Limpa variáveis que atrapalham
7
+ os.environ.pop("QT_QPA_PLATFORM_PLUGIN_PATH", None)
8
+ os.environ.pop("QT_PLUGIN_PATH", None)
9
+
10
+ # Escolhe plataforma correta por SO
11
+ if prefer_platform:
12
+ platform = prefer_platform
13
+ else:
14
+ if sys.platform.startswith("win"): # Windows
15
+ platform = "windows"
16
+ elif sys.platform == "darwin": # macOS
17
+ platform = "cocoa"
18
+ else: # Linux/BSD
19
+ # xcb (X11) ou wayland – escolha a que seu público usa mais
20
+ platform = "xcb"
21
+
22
+ os.environ["QT_QPA_PLATFORM"] = platform
23
+
24
+ # Remova caminhos herdados ruins
25
+ for p in list(QCoreApplication.libraryPaths()):
26
+ if "cv2/qt/plugins" in p.replace("\\", "/"):
27
+ QCoreApplication.removeLibraryPath(p)
28
+
29
+ # Garanta os plugins do PyQt5
30
+ QCoreApplication.addLibraryPath(QLibraryInfo.location(QLibraryInfo.PluginsPath))
31
+
32
+
33
+ def assert_not_using_cv2_plugins() -> None:
34
+
35
+ for p in QCoreApplication.libraryPaths():
36
+ if "cv2/qt/plugins" in p:
37
+ raise RuntimeError(
38
+ "Error"
39
+ )
@@ -56,7 +56,7 @@ class ImageCropper(QMainWindow):
56
56
 
57
57
  # self.test = True
58
58
  self.test = False
59
- print("teste")
59
+ # print("teste")
60
60
 
61
61
 
62
62
  self.setWindowTitle('Analysis Droplet Parameters')
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: drap
3
- Version: 0.0.3.post9
3
+ Version: 0.0.3.post11
4
4
  Summary: Tool for analyzing droplet size and concentration using video and EDF images
5
5
  Author-email: "Gabriel Braga Marques Teobaldo, Oleg Prymak, Natalie Wolff, Matthias Epple, Marco Aurélio Brizzotti Andrade, Cássio Alves and Cristiano Luis Pinto de Oliveira" <alves.casssio@gmail.com>
6
6
  License: MIT
@@ -36,7 +36,7 @@ Install:
36
36
 
37
37
  python -m venv venv
38
38
 
39
- source venv/bin/activate
39
+ source venv/bin/activate (Linux) or venv\Scripts\activate (windows)
40
40
 
41
41
  pip install drap
42
42
 
@@ -1,32 +0,0 @@
1
-
2
- import os
3
- from PyQt5.QtCore import QLibraryInfo, QCoreApplication
4
-
5
- from typing import Optional
6
-
7
- def fix_qt_plugin_paths(prefer_platform: Optional[str] = None) -> None:
8
-
9
- os.environ.pop("QT_QPA_PLATFORM_PLUGIN_PATH", None)
10
- os.environ.pop("QT_PLUGIN_PATH", None)
11
-
12
- if prefer_platform:
13
- os.environ["QT_QPA_PLATFORM"] = prefer_platform
14
- else:
15
- os.environ.setdefault("QT_QPA_PLATFORM", "xcb") # ou 'wayland' conforme seu público
16
-
17
-
18
- for p in list(QCoreApplication.libraryPaths()):
19
- if "cv2/qt/plugins" in p:
20
- QCoreApplication.removeLibraryPath(p)
21
-
22
-
23
- pyqt_plugins = QLibraryInfo.location(QLibraryInfo.PluginsPath)
24
- QCoreApplication.addLibraryPath(pyqt_plugins)
25
-
26
- def assert_not_using_cv2_plugins() -> None:
27
-
28
- for p in QCoreApplication.libraryPaths():
29
- if "cv2/qt/plugins" in p:
30
- raise RuntimeError(
31
- "Error"
32
- )
File without changes
File without changes
File without changes
File without changes