diff --git a/setup.py b/setup.py index cf95aca137dfbf25b749dee85f5fe3cdebeda16c..87632fe925b1c21a15632a3c18a5c451b90fe767 100644 --- a/setup.py +++ b/setup.py @@ -378,8 +378,7 @@ class RearrangeCMakeOutput(object): 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: