Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
42ecfc55
O
Opencv
项目概览
Greenplum
/
Opencv
10 个月 前同步成功
通知
7
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
Opencv
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
42ecfc55
编写于
7月 23, 2014
作者:
A
Alexander Mordvintsev
提交者:
Alexander Mordvintsev
7月 27, 2014
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fixed parsing enums with tailing comma
gen2.py reports headers it processes cmake file restructured
上级
964657a1
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
30 addition
and
29 deletion
+30
-29
modules/python/CMakeLists.txt
modules/python/CMakeLists.txt
+27
-29
modules/python/src2/gen2.py
modules/python/src2/gen2.py
+1
-0
modules/python/src2/hdr_parser.py
modules/python/src2/hdr_parser.py
+2
-0
未找到文件。
modules/python/CMakeLists.txt
浏览文件 @
42ecfc55
...
...
@@ -12,23 +12,18 @@ endif()
set
(
the_description
"The python bindings"
)
set
(
candidate_deps
_raw
)
set
(
candidate_deps
)
foreach
(
mp
${
OPENCV_MODULES_PATH
}
${
OPENCV_EXTRA_MODULES_PATH
}
)
file
(
GLOB names
"
${
mp
}
/*"
)
list
(
APPEND candidate_deps_raw
${
names
}
)
endforeach
(
mp
)
set
(
candidate_deps
)
foreach
(
m IN LISTS candidate_deps_raw
)
if
(
IS_DIRECTORY
${
m
}
)
get_filename_component
(
m
${
m
}
NAME
)
if
(
NOT
${
m
}
MATCHES
"^cud(a|ev)"
)
if
(
NOT
${
m
}
MATCHES
"optim"
)
# unless we handle namespaces
list
(
APPEND candidate_deps
"opencv_
${
m
}
"
)
foreach
(
m IN LISTS names
)
if
(
IS_DIRECTORY
${
m
}
)
get_filename_component
(
m
${
m
}
NAME
)
if
(
NOT
${
m
}
MATCHES
"^cud(a|ev)"
)
list
(
APPEND candidate_deps
"opencv_
${
m
}
"
)
endif
()
endif
()
endif
()
endif
()
endforeach
(
m
)
endforeach
(
m
)
endforeach
(
mp
)
ocv_add_module
(
python BINDINGS OPTIONAL
${
candidate_deps
}
)
...
...
@@ -39,23 +34,26 @@ ocv_module_include_directories(
)
set
(
opencv_hdrs_raw
)
foreach
(
m IN LISTS OPENCV_MODULE_opencv_python_DEPS
)
list
(
APPEND opencv_hdrs_raw
"
${
OPENCV_MODULE_
${
m
}
_HEADERS
}
"
)
endforeach
(
m
)
set
(
opencv_hdrs_blacklist
".h$"
"opencv2/core/cuda"
"opencv2/objdetect/detection_based_tracker.hpp"
"opencv2/optim.hpp"
)
# remove problematic headers
set
(
opencv_hdrs
)
foreach
(
hdr IN LISTS opencv_hdrs_raw
)
if
(
NOT
${
hdr
}
MATCHES
".h$"
)
if
(
NOT
${
hdr
}
MATCHES
"opencv2/core/cuda"
)
if
(
NOT
${
hdr
}
MATCHES
"opencv2/objdetect/detection_based_tracker.hpp"
)
list
(
APPEND opencv_hdrs
${
hdr
}
)
endif
()
endif
()
endif
()
endforeach
(
hdr
)
foreach
(
m IN LISTS OPENCV_MODULE_opencv_python_DEPS
)
foreach
(
hdr IN LISTS OPENCV_MODULE_
${
m
}
_HEADERS
)
set
(
good TRUE
)
foreach
(
s IN LISTS opencv_hdrs_blacklist
)
if
(
${
hdr
}
MATCHES
${
s
}
)
set
(
good FALSE
)
endif
()
endforeach
(
s
)
if
(
${
good
}
)
list
(
APPEND opencv_hdrs
${
hdr
}
)
endif
()
endforeach
(
hdr
)
endforeach
(
m
)
set
(
cv2_generated_hdrs
"
${
CMAKE_CURRENT_BINARY_DIR
}
/pyopencv_generated_include.h"
...
...
modules/python/src2/gen2.py
浏览文件 @
42ecfc55
...
...
@@ -831,6 +831,7 @@ class PythonWrapperGenerator(object):
# step 1: scan the headers and build more descriptive maps of classes, consts, functions
for
hdr
in
srcfiles
:
print
(
hdr
)
decls
=
parser
.
parse
(
hdr
)
if
len
(
decls
)
==
0
:
continue
...
...
modules/python/src2/hdr_parser.py
浏览文件 @
42ecfc55
...
...
@@ -206,6 +206,8 @@ class CppHeaderParser(object):
def
parse_enum
(
self
,
decl_str
):
l
=
decl_str
ll
=
l
.
split
(
","
)
if
ll
[
-
1
].
strip
()
==
""
:
ll
=
ll
[:
-
1
]
prev_val
=
""
prev_val_delta
=
-
1
decl
=
[]
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录