diff --git a/MANIFEST.in b/MANIFEST.in index 45cb6c40..b429eae0 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -9,3 +9,4 @@ recursive-include docker * recursive-include opencv * recursive-include opencv_contrib * recursive-include patches * +recursive-include scripts *.py diff --git a/setup.py b/setup.py index 1b1f59c7..87632fe9 100644 --- a/setup.py +++ b/setup.py @@ -378,7 +378,7 @@ def _classify_installed_files_override( print("Copying files from CMake output") # add lines from the old __init__.py file to the config file - with open('scripts/__init__.py', 'r') as custom_init: + 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() with open('%spython/cv2/config-%s.%s.py' % (cmake_install_dir, sys.version_info[0], sys.version_info[1]), 'w') as opencv_init_config: