Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenCV
opencv-python
提交
07e56463
O
opencv-python
项目概览
OpenCV
/
opencv-python
12 个月 前同步成功
通知
230
Star
3707
Fork
754
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
opencv-python
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
07e56463
编写于
2月 20, 2018
作者:
O
Olli-Pekka Heinisuo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ternary operators need parentheses
上级
62fe1dc2
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
8 addition
and
10 deletion
+8
-10
setup.py
setup.py
+8
-10
未找到文件。
setup.py
浏览文件 @
07e56463
...
...
@@ -31,12 +31,12 @@ def main():
use_depth
=
g
.
get_git_version
()
>=
type
(
g
.
get_git_version
())(
"1.8.4"
)
g
.
run_command
([
"submodule"
,
"update"
,
"--init"
,
"--recursive"
]
+
[
"--depth=1"
]
if
use_depth
else
[]
+
([
"--depth=1"
]
if
use_depth
else
[])
+
[
cmake_source_dir
])
if
build_contrib
:
g
.
run_command
([
"submodule"
,
"update"
,
"--init"
,
"--recursive"
]
+
[
"--depth=1"
]
if
use_depth
else
[]
+
([
"--depth=1"
]
if
use_depth
else
[])
+
[
"opencv_contrib"
])
del
use_depth
,
g
,
pip
...
...
@@ -52,7 +52,7 @@ def main():
package_data
=
{
'cv2'
:
[
'*%s'
%
sysconfig
.
get_config_var
(
'SO'
)]
+
[
'*.dll'
]
if
os
.
name
==
'nt'
else
[]
+
([
'*.dll'
]
if
os
.
name
==
'nt'
else
[])
+
[
"LICENSE.txt"
,
"LICENSE-3RD-PARTY.txt"
],
'cv2.data'
:
[
"*.xml"
]
...
...
@@ -61,7 +61,7 @@ def main():
# Files from CMake output to copy to package.
# Path regexes with forward slashes relative to CMake install dir.
rearrange_cmake_output_data
=
{
'cv2'
:
[
r
'bin/opencv_ffmpeg\d{3}%s\.dll'
%
(
'_64'
if
x64
else
''
)]
if
os
.
name
==
'nt'
else
[]
+
'cv2'
:
([
r
'bin/opencv_ffmpeg\d{3}%s\.dll'
%
(
'_64'
if
x64
else
''
)]
if
os
.
name
==
'nt'
else
[])
+
# In Windows, in python/X.Y/<arch>/; in Linux, in just python/X.Y/.
# Naming conventions vary so widely between versions and OSes
# had to give up on checking them.
...
...
@@ -78,11 +78,11 @@ def main():
'cv2'
:
[
'LICENSE.txt'
,
'LICENSE-3RD-PARTY.txt'
]
}
cmake_args
=
[
cmake_args
=
(
[
"-G"
,
"Visual Studio 14"
+
(
" Win64"
if
x64
else
''
)
]
if
os
.
name
==
'nt'
else
[
"-G"
,
"Unix Makefiles"
# don't make CMake try (and fail) Ninja first
]
+
[
]
)
+
[
# 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
],
...
...
@@ -95,7 +95,7 @@ def main():
"-DBUILD_TESTS=OFF"
,
"-DBUILD_PERF_TESTS=OFF"
,
"-DBUILD_DOCS=OFF"
]
+
[
"-DOPENCV_EXTRA_MODULES_PATH="
+
os
.
path
.
abspath
(
"opencv_contrib/modules"
)]
if
build_contrib
else
[]
]
+
([
"-DOPENCV_EXTRA_MODULES_PATH="
+
os
.
path
.
abspath
(
"opencv_contrib/modules"
)]
if
build_contrib
else
[])
# OS-specific components
if
sys
.
platform
==
'darwin'
or
sys
.
platform
.
startswith
(
'linux'
):
...
...
@@ -280,7 +280,6 @@ class RearrangeCMakeOutput(object):
)
final_install_relpaths
.
append
(
new_install_relpath
)
final_install_paths
=
[
os
.
path
.
join
(
cmake_install_dir
,
p
)
for
p
in
final_install_relpaths
]
return
(
cls
.
wraps
.
_classify_files
)(
...
...
@@ -329,8 +328,7 @@ def get_or_install(name, version=None):
js_packages
=
json
.
loads
(
subprocess
.
check_output
([
sys
.
executable
,
"-m"
,
"pip"
,
"list"
,
"--format"
,
"json"
]).
decode
(
'ascii'
))
# valid names & versions are ASCII as per PEP 440
try
:
[
package
]
=
(
package
for
package
in
js_packages
if
package
[
'name'
]
==
name
)
[
package
]
=
(
package
for
package
in
js_packages
if
package
[
'name'
]
==
name
)
except
ValueError
:
install_packages
(
"%s==%s"
%
(
name
,
version
)
if
version
else
name
)
return
version
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录