File: setup-py-for-egg.patch

package info (click to toggle)
opencv 4.10.0%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 282,092 kB
  • sloc: cpp: 1,178,079; xml: 682,621; python: 49,092; lisp: 31,150; java: 25,469; ansic: 11,039; javascript: 6,085; sh: 1,214; cs: 601; perl: 494; objc: 210; makefile: 173
file content (48 lines) | stat: -rw-r--r-- 1,677 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
Index: opencv/modules/python/package/setup.py
===================================================================
--- opencv.orig/modules/python/package/setup.py	2025-03-14 15:45:41.688286260 +0000
+++ opencv/modules/python/package/setup.py	2025-03-14 15:45:54.591902691 +0000
@@ -5,16 +5,6 @@
 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)
 
@@ -23,14 +13,6 @@
 
     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,
@@ -39,10 +21,7 @@
         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=[