Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 17d330f

Browse filesBrowse files
committed
try to fix cmake python 3.7 errors
1 parent cc33ed4 commit 17d330f
Copy full SHA for 17d330f

File tree

Expand file treeCollapse file tree

1 file changed

+5
-5
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-5
lines changed

‎setup.py

Copy file name to clipboardExpand all lines: setup.py
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.