Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #563 from asenyaev/asen/python_loader_support
Updated submodules to the release 4.5.4 and added python loader support
- Loading branch information
Showing
7 changed files
with
69 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +0,0 @@ | ||
import importlib | ||
import os | ||
import sys | ||
|
||
from .cv2 import * | ||
from .data import * | ||
|
||
# wildcard import above does not import "private" variables like __version__ | ||
# this makes them available | ||
globals().update(importlib.import_module("cv2.cv2").__dict__) | ||
|
||
ci_and_not_headless = False | ||
|
||
try: | ||
from .version import ci_build, headless | ||
|
||
ci_and_not_headless = ci_build and not headless | ||
except: | ||
pass | ||
|
||
# the Qt plugin is included currently only in the pre-built wheels | ||
if sys.platform.startswith("linux") and ci_and_not_headless: | ||
os.environ["QT_QPA_PLATFORM_PLUGIN_PATH"] = os.path.join( | ||
os.path.dirname(os.path.abspath(__file__)), "qt", "plugins" | ||
) | ||
|
||
# Qt will throw warning on Linux if fonts are not found | ||
if sys.platform.startswith("linux") and ci_and_not_headless: | ||
os.environ["QT_QPA_FONTDIR"] = os.path.join( | ||
os.path.dirname(os.path.abspath(__file__)), "qt", "fonts" | ||
) | ||
Submodule opencv_contrib
updated
123 files
Submodule opencv_extra
updated
232 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
PYTHON_EXTENSIONS_PATHS = [ | ||
LOADER_DIR | ||
] + PYTHON_EXTENSIONS_PATHS | ||
|
||
ci_and_not_headless = False | ||
|
||
try: | ||
from .version import ci_build, headless | ||
|
||
ci_and_not_headless = ci_build and not headless | ||
except: | ||
pass | ||
|
||
# the Qt plugin is included currently only in the pre-built wheels | ||
if sys.platform.startswith("linux") and ci_and_not_headless: | ||
os.environ["QT_QPA_PLATFORM_PLUGIN_PATH"] = os.path.join( | ||
os.path.dirname(os.path.abspath(__file__)), "qt", "plugins" | ||
) | ||
|
||
# Qt will throw warning on Linux if fonts are not found | ||
if sys.platform.startswith("linux") and ci_and_not_headless: | ||
os.environ["QT_QPA_FONTDIR"] = os.path.join( | ||
os.path.dirname(os.path.abspath(__file__)), "qt", "fonts" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters