From 810ca4ecd3e694ed5d5506daadaec3d49bf49d93 Mon Sep 17 00:00:00 2001 From: Andrey Senyaev Date: Mon, 1 Nov 2021 17:56:25 +0300 Subject: [PATCH 1/2] Fixed a build from the source --- MANIFEST.in | 1 + setup.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) 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..cf95aca1 100644 --- a/setup.py +++ b/setup.py @@ -378,7 +378,8 @@ 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('%s/scripts/__init__.py' + % os.path.split(os.path.abspath(__file__))[0], '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: From 9a7af2aa4090d40a981cf91ef2b3c4c363e356de Mon Sep 17 00:00:00 2001 From: Andrey Senyaev Date: Mon, 8 Nov 2021 15:38:20 +0300 Subject: [PATCH 2/2] Changed defining path to scripts/__init__.py file --- setup.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setup.py b/setup.py index cf95aca1..87632fe9 100644 --- a/setup.py +++ b/setup.py @@ -378,8 +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('%s/scripts/__init__.py' - % os.path.split(os.path.abspath(__file__))[0], '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: