forked from nasa-jpl/autoRIFT
-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.py
47 lines (37 loc) · 1.32 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
#!/usr/bin/env python3
import numpy as np
import os
from distutils.core import setup
from distutils.extension import Extension
##Figure out opencv paths
try:
import cv2
except:
raise Exception('OpenCV does not appear to be installed. Install before proceeding ... ')
##Figure out paths for headers and libraries
bldInfo = cv2.getBuildInformation().splitlines()
for line in bldInfo:
if 'Install to:' in line:
path = line.split()[-1]
break
print('Open CV path: ', path)
extensions = [
Extension(
name="autoRIFT/autoriftcore",
sources= ['geo_autoRIFT/autoRIFT/bindings/autoriftcoremodule.cpp'],
include_dirs=[np.get_include()] +
['geo_autoRIFT/autoRIFT/include',
os.path.join(path, 'include')],
library_dirs = [os.path.join(path, 'lib')],
libraries=['opencv_core', 'opencv_highgui', 'opencv_imgproc'],
extra_compile_args=['-std=c++11'],
language="c++"
)
]
setup (name = 'autoRIFT',
version = '1.0.0',
description = 'This is the autoRIFT python package',
package_dir={'autoRIFT': 'geo_autoRIFT/autoRIFT', 'geogrid': 'geo_autoRIFT/geogrid'},
packages=['autoRIFT', 'geogrid'],
# scripts=['geo_autoRIFT/geogrid/GeogridOptical.py'],
ext_modules = extensions)