File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
Filter options
Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
Original file line number Diff line number Diff line change @@ -366,15 +366,13 @@ def _classify_installed_files_override(
366
366
print ("Copying files from CMake output" )
367
367
368
368
# lines for a proper work using pylint and an autocomplete in IDE
369
- with open ("%spython/cv2/__init__.py"
370
- % cmake_install_dir , 'r' ) as opencv_init :
369
+ with open (os .path .join (cmake_install_dir , "python" , "cv2" , "__init__.py" ), 'r' ) as opencv_init :
371
370
opencv_init_lines = opencv_init .readlines ()
372
371
extra_imports = ('\n from .cv2 import *\n from . import data\n ' )
373
372
free_line_after_imports = 5
374
373
opencv_init_lines .insert (free_line_after_imports , extra_imports )
375
374
376
- with open ("%spython/cv2/__init__.py"
377
- % cmake_install_dir , 'w' ) as opencv_final_init :
375
+ with open (os .path .join (cmake_install_dir , "python" , "cv2" , "__init__.py" ), 'w' ) as opencv_final_init :
378
376
opencv_final_init .writelines (opencv_init_lines )
379
377
380
378
# add lines from the old __init__.py file to the config file
You can’t perform that action at this time.
0 commit comments