1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 07:13:02 +04:00

Merge branch 4.x

This commit is contained in:
Alexander Smorkalov
2023-06-01 09:37:38 +03:00
565 changed files with 84396 additions and 17589 deletions
+25 -3
View File
@@ -1,9 +1,19 @@
import os
import sys
import platform
import setuptools
SCRIPT_DIR=os.path.dirname(os.path.abspath(__file__))
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
def collect_module_typing_stub_files(root_module_path):
stub_files = []
for module_path, _, files in os.walk(root_module_path):
stub_files.extend(
map(lambda p: os.path.join(module_path, p),
filter(lambda f: f.endswith(".pyi"), files))
)
return stub_files
def main():
os.chdir(SCRIPT_DIR)
@@ -13,6 +23,14 @@ def main():
long_description = 'Open Source Computer Vision Library Python bindings' # TODO
root_module_path = os.path.join(SCRIPT_DIR, "cv2")
py_typed_path = os.path.join(root_module_path, "py.typed")
typing_stub_files = []
if os.path.isfile(py_typed_path):
typing_stub_files = collect_module_typing_stub_files(root_module_path)
if len(typing_stub_files) > 0:
typing_stub_files.append(py_typed_path)
setuptools.setup(
name=package_name,
version=package_version,
@@ -22,6 +40,9 @@ def main():
long_description=long_description,
long_description_content_type="text/markdown",
packages=setuptools.find_packages(),
package_data={
"cv2": typing_stub_files
},
maintainer="OpenCV Team",
install_requires="numpy",
classifiers=[
@@ -55,5 +76,6 @@ def main():
],
)
if __name__ == '__main__':
main()