@@ -102,14 +102,16 @@ def main():
102
102
"-G" , "Unix Makefiles" # don't make CMake try (and fail) Ninja first
103
103
]) + [
104
104
# 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" ,
107
109
108
110
# When off, adds __init__.py and a few more helper .py's. We use our own helper files with a different structure.
109
111
"-DOPENCV_SKIP_PYTHON_LOADER=ON" ,
110
112
# Relative dir to install the built module to in the build tree.
111
113
# 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" ,
113
115
# Otherwise, opencv scripts would want to install `.pyd' right into site-packages,
114
116
# and skbuild bails out on seeing that
115
117
"-DINSTALL_CREATE_DISTRIB=ON" ,
@@ -202,8 +204,6 @@ def main():
202
204
'Operating System :: POSIX' ,
203
205
'Operating System :: Unix' ,
204
206
'Programming Language :: Python' ,
205
- 'Programming Language :: Python :: 2' ,
206
- 'Programming Language :: Python :: 2.7' ,
207
207
'Programming Language :: Python :: 3' ,
208
208
'Programming Language :: Python :: 3.5' ,
209
209
'Programming Language :: Python :: 3.6' ,
0 commit comments