@@ -102,14 +102,16 @@ def main():
102102 "-G" , "Unix Makefiles" # don't make CMake try (and fail) Ninja first
103103 ]) + [
104104 # skbuild inserts PYTHON_* vars. That doesn't satisfy opencv build scripts in case of Py3
105- "-DPYTHON%d_EXECUTABLE=%s" % (sys .version_info [0 ], sys .executable ),
106- "-DBUILD_opencv_python%d=ON" % sys .version_info [0 ],
105+ "-DPYTHON_DEFAULT_EXECUTABLE=%s" % sys .executable ,
106+ "-DPYTHON3_EXECUTABLE=%s" % sys .executable ,
107+ "-DBUILD_opencv_python3=ON" ,
108+ "-DBUILD_opencv_python2=OFF" ,
107109
108110 # When off, adds __init__.py and a few more helper .py's. We use our own helper files with a different structure.
109111 "-DOPENCV_SKIP_PYTHON_LOADER=ON" ,
110112 # Relative dir to install the built module to in the build tree.
111113 # The default is generated from sysconfig, we'd rather have a constant for simplicity
112- "-DOPENCV_PYTHON%d_INSTALL_PATH =python" % sys . version_info [ 0 ] ,
114+ "-DOPENCV_PYTHON3_INSTALL_PATH =python" ,
113115 # Otherwise, opencv scripts would want to install `.pyd' right into site-packages,
114116 # and skbuild bails out on seeing that
115117 "-DINSTALL_CREATE_DISTRIB=ON" ,
@@ -202,8 +204,6 @@ def main():
202204 'Operating System :: POSIX' ,
203205 'Operating System :: Unix' ,
204206 'Programming Language :: Python' ,
205- 'Programming Language :: Python :: 2' ,
206- 'Programming Language :: Python :: 2.7' ,
207207 'Programming Language :: Python :: 3' ,
208208 'Programming Language :: Python :: 3.5' ,
209209 'Programming Language :: Python :: 3.6' ,
0 commit comments