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)
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,
description='OpenCV python bindings',
long_description=long_description,
long_description_content_type="text/markdown",
- packages=setuptools.find_packages(),
- package_data={
- "cv2": typing_stub_files
- },
+ packages=[],
maintainer="OpenCV Team",
install_requires="numpy",
classifiers=[