Skip to content

Commit 059fea0

Browse files
native-apiskvark
authored andcommitted
* No need for both OPENCV_PYTHON{2,3}_INSTALL_PATH in cmake args
* Add explanation to more obscure cmake args
1 parent 008134f commit 059fea0

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

setup.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,16 @@ def main():
102102
# skbuild inserts PYTHON_* vars. That doesn't satisfy opencv build scripts in case of Py3
103103
"-DPYTHON%d_EXECUTABLE=%s" % (sys.version_info[0], sys.executable),
104104
"-DBUILD_opencv_python%d=ON" % sys.version_info[0],
105+
106+
# When off, adds __init__.py and a few more helper .py's. We use our own helper files with a different structure.
105107
"-DOPENCV_SKIP_PYTHON_LOADER=ON",
106-
"-DOPENCV_PYTHON2_INSTALL_PATH=python",
107-
"-DOPENCV_PYTHON3_INSTALL_PATH=python",
108+
# Relative dir to install the built module to in the build tree.
109+
# The default is generated from sysconfig, we'd rather have a constant for simplicity
110+
"-DOPENCV_PYTHON%d_INSTALL_PATH=python" % sys.version_info[0],
108111
# Otherwise, opencv scripts would want to install `.pyd' right into site-packages,
109112
# and skbuild bails out on seeing that
110113
"-DINSTALL_CREATE_DISTRIB=ON",
114+
111115
# See opencv/CMakeLists.txt for options and defaults
112116
"-DBUILD_opencv_apps=OFF",
113117
"-DBUILD_SHARED_LIBS=OFF",

0 commit comments

Comments
 (0)