-
Notifications
You must be signed in to change notification settings - Fork 895
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
Conversation
setup.py
Outdated
# 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: | ||
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: | ||
opencv_final_init.writelines(opencv_init_lines) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same logic as in #579, but we have here only two imports.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
os.path.join should be better than string substitution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated it in the latest commit.
Tested in my fork repo: