Upload 2 files
Browse files- cv2/config-3.py +24 -0
- cv2/config.py +5 -0
cv2/config-3.py
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
PYTHON_EXTENSIONS_PATHS = [
|
2 |
+
LOADER_DIR
|
3 |
+
] + PYTHON_EXTENSIONS_PATHS
|
4 |
+
|
5 |
+
ci_and_not_headless = False
|
6 |
+
|
7 |
+
try:
|
8 |
+
from .version import ci_build, headless
|
9 |
+
|
10 |
+
ci_and_not_headless = ci_build and not headless
|
11 |
+
except:
|
12 |
+
pass
|
13 |
+
|
14 |
+
# the Qt plugin is included currently only in the pre-built wheels
|
15 |
+
if sys.platform.startswith("linux") and ci_and_not_headless:
|
16 |
+
os.environ["QT_QPA_PLATFORM_PLUGIN_PATH"] = os.path.join(
|
17 |
+
os.path.dirname(os.path.abspath(__file__)), "qt", "plugins"
|
18 |
+
)
|
19 |
+
|
20 |
+
# Qt will throw warning on Linux if fonts are not found
|
21 |
+
if sys.platform.startswith("linux") and ci_and_not_headless:
|
22 |
+
os.environ["QT_QPA_FONTDIR"] = os.path.join(
|
23 |
+
os.path.dirname(os.path.abspath(__file__)), "qt", "fonts"
|
24 |
+
)
|
cv2/config.py
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import os
|
2 |
+
|
3 |
+
BINARIES_PATHS = [
|
4 |
+
os.path.join(os.path.join(LOADER_DIR, '../../'), 'x64/vc14/bin')
|
5 |
+
] + BINARIES_PATHS
|