forked from opencv/opencv-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
69 lines (59 loc) · 2.1 KB
/
setup.py
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
from setuptools import setup
from setuptools.dist import Distribution
import pip
import os
import sys
import io
long_description = ""
with io.open('README.rst', encoding="utf-8") as f:
long_description = f.read()
# cv_version.py should be generated by running find_version.py
from cv_version import opencv_version
numpy_version = ""
# Get required numpy version
for package in pip.get_installed_distributions():
if package.key == "numpy":
numpy_version = package.version
class BinaryDistribution(Distribution):
""" Forces BinaryDistribution. """
def has_ext_modules(self):
return True
def is_pure(self):
return False
package_data = {}
if os.name == 'posix':
package_data['cv2'] = ['*.so']
else:
package_data['cv2'] = ['*.pyd', '*.dll']
setup(name='opencv-python',
version=opencv_version,
url='https://github.com/skvark/opencv-python',
license='MIT',
description='Wrapper package for OpenCV python bindings.',
long_description = long_description,
distclass=BinaryDistribution,
packages=['cv2'],
package_data=package_data,
maintainer="Olli-Pekka Heinisuo",
include_package_data=True,
install_requires="numpy>=%s" % numpy_version,
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Intended Audience :: Developers',
'Intended Audience :: Education',
'Intended Audience :: Information Technology',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: MIT License',
'Operating System :: MacOS',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX',
'Operating System :: Unix',
'Programming Language :: Python',
'Programming Language :: C++',
'Programming Language :: Python :: Implementation :: CPython',
'Topic :: Scientific/Engineering',
'Topic :: Scientific/Engineering :: Image Recognition',
'Topic :: Software Development',
]
)