python: 'sub-module' for binding sources and documentation meta information
This commit is contained in:
@@ -46,20 +46,7 @@ gen_template_func_body = Template("""$code_decl
|
||||
}
|
||||
""")
|
||||
|
||||
py_major_version = sys.version_info[0]
|
||||
if __name__ == "__main__":
|
||||
if len(sys.argv) > 3:
|
||||
if sys.argv[3] == 'PYTHON3':
|
||||
py_major_version = 3
|
||||
elif sys.argv[3] == 'PYTHON2':
|
||||
py_major_version = 2
|
||||
else:
|
||||
raise Exception('Incorrect argument: expected PYTHON2 or PYTHON3, received: ' + sys.argv[3])
|
||||
if py_major_version >= 3:
|
||||
head_init_str = "PyVarObject_HEAD_INIT(&PyType_Type, 0)"
|
||||
else:
|
||||
head_init_str = """PyObject_HEAD_INIT(&PyType_Type)
|
||||
0,"""
|
||||
head_init_str = "CV_PYTHON_TYPE_HEAD_INIT()"
|
||||
|
||||
gen_template_simple_type_decl = Template("""
|
||||
struct pyopencv_${name}_t
|
||||
|
||||
Reference in New Issue
Block a user