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

Update 3.4 branch to the latest changes in master #584

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Nov 12, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Changed a string substitution to os.path.join
  • Loading branch information
asenyaev committed Nov 11, 2021
commit 87e4f4d21cb267b222cbe69c082042d2a037836c
6 changes: 2 additions & 4 deletions 6 setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,15 +366,13 @@ def _classify_installed_files_override(
print("Copying files from CMake output")

# lines for a proper work using pylint and an autocomplete in IDE
with open("%spython/cv2/__init__.py"
% cmake_install_dir, 'r') as opencv_init:
with open(os.path.join(cmake_install_dir, "python", "cv2", "__init__.py"), 'r') as opencv_init:
opencv_init_lines = opencv_init.readlines()
extra_imports = ('\nfrom .cv2 import *\nfrom . import data\n')
free_line_after_imports = 5
opencv_init_lines.insert(free_line_after_imports, extra_imports)

with open("%spython/cv2/__init__.py"
% cmake_install_dir, 'w') as opencv_final_init:
with open(os.path.join(cmake_install_dir, "python", "cv2", "__init__.py"), 'w') as opencv_final_init:
opencv_final_init.writelines(opencv_init_lines)

# add lines from the old __init__.py file to the config file
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.