File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed
Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ import sys
2+ from cv2 import cv2
3+ sys .modules ['cv2' ] = cv2
Original file line number Diff line number Diff line change 1+ from setuptools import setup
2+ import os
3+ import sys
4+
5+ opencv_version = ""
6+
7+ if "--opencv_version" in sys .argv :
8+ index = sys .argv .index ('--opencv-version' )
9+ sys .argv .pop (index )
10+ opencv_version = sys .argv .pop (index )
11+ else :
12+ print ("Error: no version info (--opencv-version missing), exiting." )
13+ exit (1 )
14+
15+ package_data = {}
16+
17+ if os .name == 'posix' :
18+ package_data ['cv2' ] = ['*.so' ]
19+ else :
20+ package_data ['cv2' ] = ['*.pyd' ]
21+
22+ setup (name = 'opencv-python' ,
23+ version = opencv_version ,
24+ description = 'OpenCV' ,
25+ packages = ['cv2' ],
26+ package_data = package_data ,
27+ install_requires = "numpy" ,
28+ )
You can’t perform that action at this time.
0 commit comments