forked from mapillary/OpenSfM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
38 lines (32 loc) · 870 Bytes
/
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
#!/usr/bin/env python
from distutils.core import setup
import sys
import os
import errno
import subprocess
def mkdir_p(path):
'''Make a directory including parent directories.
'''
try:
os.makedirs(path)
except os.error as exc:
if exc.errno != errno.EEXIST or not os.path.isdir(path):
raise
print "Configuring..."
mkdir_p('cmake_build')
subprocess.Popen(['cmake','../opensfm/src'], cwd='cmake_build').wait()
print "Compiling extension..."
subprocess.Popen(['make','-j4'], cwd='cmake_build').wait()
print "Building package"
setup(
name='OpenSfM',
version='0.1',
description='A Structure from Motion library',
url='https://github.com/mapillary/OpenSfM',
author='Mapillary',
license='BSD',
packages=['opensfm'],
package_data={
'opensfm': ['csfm.so', 'data/sensor_data.json']
},
)