From f08d11d7bd86ef0d4a1be727f5912c7b61a8c9a8 Mon Sep 17 00:00:00 2001 From: Ivan Pozdeev Date: Fri, 22 Mar 2019 01:16:35 +0300 Subject: [PATCH] * No need for both OPENCV_PYTHON{2,3}_INSTALL_PATH in cmake args * Add explanation to more obscure cmake args --- setup.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 06dfe27..4cf0e73 100644 --- a/setup.py +++ b/setup.py @@ -102,12 +102,16 @@ def main(): # skbuild inserts PYTHON_* vars. That doesn't satisfy opencv build scripts in case of Py3 "-DPYTHON%d_EXECUTABLE=%s" % (sys.version_info[0], sys.executable), "-DBUILD_opencv_python%d=ON" % sys.version_info[0], + + # When off, adds __init__.py and a few more helper .py's. We use our own helper files with a different structure. "-DOPENCV_SKIP_PYTHON_LOADER=ON", - "-DOPENCV_PYTHON2_INSTALL_PATH=python", - "-DOPENCV_PYTHON3_INSTALL_PATH=python", + # Relative dir to install the built module to in the build tree. + # The default is generated from sysconfig, we'd rather have a constant for simplicity + "-DOPENCV_PYTHON%d_INSTALL_PATH=python" % sys.version_info[0], # Otherwise, opencv scripts would want to install `.pyd' right into site-packages, # and skbuild bails out on seeing that "-DINSTALL_CREATE_DISTRIB=ON", + # See opencv/CMakeLists.txt for options and defaults "-DBUILD_opencv_apps=OFF", "-DBUILD_SHARED_LIBS=OFF", -- GitLab