Skip to content

Update 3.4 branch for 3.4.18 release #671

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 2 commits into from
Jun 6, 2022
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
Next Next commit
Removed unused lines
  • Loading branch information
asenyaev committed Jun 5, 2022
commit f9657207ba5b645fa35f204d5713ca31f19cd78d
10 changes: 0 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,16 +362,6 @@ 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(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\nfrom . import version\n')
free_line_after_imports = 5
opencv_init_lines.insert(free_line_after_imports, extra_imports)

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
with open(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'scripts', '__init__.py'), 'r') as custom_init:
custom_init_data = custom_init.read()
Expand Down