Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 87e4f4d

Browse filesBrowse files
committed
Changed a string substitution to os.path.join
1 parent 19ed001 commit 87e4f4d
Copy full SHA for 87e4f4d

File tree

Expand file treeCollapse file tree

1 file changed

+2
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-4
lines changed

‎setup.py

Copy file name to clipboardExpand all lines: setup.py
+2-4Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -366,15 +366,13 @@ def _classify_installed_files_override(
366366
print("Copying files from CMake output")
367367

368368
# 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:
371370
opencv_init_lines = opencv_init.readlines()
372371
extra_imports = ('\nfrom .cv2 import *\nfrom . import data\n')
373372
free_line_after_imports = 5
374373
opencv_init_lines.insert(free_line_after_imports, extra_imports)
375374

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:
378376
opencv_final_init.writelines(opencv_init_lines)
379377

380378
# add lines from the old __init__.py file to the config file

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.