Skip to content

Commit e99f035

Browse files
committedApr 8, 2016
initial stuff
1 parent 06321ee commit e99f035

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed
 

Diff for: ‎cv2/__init__.py

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import sys
2+
from cv2 import cv2
3+
sys.modules['cv2'] = cv2

Diff for: ‎setup.py

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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+
)

0 commit comments

Comments
 (0)
Please sign in to comment.