File tree 2 files changed +4
-14
lines changed
Filter options
2 files changed +4
-14
lines changed
Original file line number Diff line number Diff line change 1
- from .cv2 import *
2
- from .data import *
1
+ PYTHON_EXTENSIONS_PATHS = [
2
+ LOADER_DIR
3
+ ] + PYTHON_EXTENSIONS_PATHS
3
4
4
5
ci_and_not_headless = False
5
6
Original file line number Diff line number Diff line change @@ -376,22 +376,11 @@ def _classify_installed_files_override(
376
376
377
377
print ("Copying files from CMake output" )
378
378
379
- # need for the proper import of a package
380
- with open ('%spython/cv2/__init__.py'
381
- % cmake_install_dir , 'r' ) as opencv_init :
382
- opencv_init_data = ""
383
- for line in opencv_init :
384
- opencv_init_replacement = line .replace ('importlib.import_module("cv2")' , 'importlib.import_module("cv2.cv2")' )
385
- opencv_init_data = opencv_init_data + opencv_init_replacement
386
- with open ('%spython/cv2/__init__.py'
387
- % cmake_install_dir , 'w' ) as opencv_python_init :
388
- opencv_python_init .write (opencv_init_data )
389
-
390
379
# add lines from the old __init__.py file to the config file
391
380
with open ('scripts/__init__.py' , 'r' ) as custom_init :
392
381
custom_init_data = custom_init .read ()
393
382
with open ('%spython/cv2/config-%s.%s.py'
394
- % (cmake_install_dir , sys .version_info [0 ], sys .version_info [1 ]), 'a ' ) as opencv_init_config :
383
+ % (cmake_install_dir , sys .version_info [0 ], sys .version_info [1 ]), 'w ' ) as opencv_init_config :
395
384
opencv_init_config .write (custom_init_data )
396
385
397
386
for package_name , relpaths_re in cls .package_paths_re .items ():
You can’t perform that action at this time.
0 commit comments