forked from geggo/MVacquire
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
32 lines (28 loc) · 1.03 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
import os, os.path, platform
from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
#import numpy as np
mvbase = os.path.normpath(os.getenv('MVIMPACT_ACQUIRE_DIR', 'matrix-vision'))
if mvbase is None:
print "Warning! mvIMPACT Acquire base directory location unknown"
mvbase = 'matrix-vision'
mvinclude = mvbase
mvlib = os.path.join(mvbase, 'lib')
bits,foo = platform.architecture()
if bits == '64bit':
mvlib = os.path.join(mvlib, r'x86_64')
ext_modules = [Extension("mv",
["_mvDeviceManager.pyx"],
libraries = ["mvDeviceManager"],
include_dirs = [mvinclude,
#np.get_include(),
],
library_dirs = [mvlib],)]
for e in ext_modules:
e.pyrex_directives = {"embedsignature": True}
setup(
name = 'matrix vision image acquisition',
cmdclass = {'build_ext': build_ext},
ext_modules = ext_modules
)