-
Notifications
You must be signed in to change notification settings - Fork 53
/
setup.py
executable file
·58 lines (48 loc) · 1.78 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
#!/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/opencv4/')],
library_dirs = [os.path.join(path, 'lib')],
libraries=['opencv_core', 'opencv_imgproc'],
extra_compile_args=['-std=c++11'],
language="c++"
),
Extension(
name="geogrid/geogridOptical",
sources= ['geo_autoRIFT/geogrid/bindings/geogridOpticalmodule.cpp','geo_autoRIFT/geogrid/src/geogridOptical.cpp'],
include_dirs=[np.get_include()] +
['geo_autoRIFT/geogrid/include',
os.path.join(path, 'include')],
library_dirs = [os.path.join(path, 'lib')],
libraries=['gomp','gdal'],
extra_compile_args=['-std=c++11'],
language="c++"
)
]
setup (name = 'geo_autoRIFT',
version = '1.5.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)