-
Notifications
You must be signed in to change notification settings - Fork 177
/
setup.py
47 lines (35 loc) · 1.34 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
from setuptools import setup
from setuptools.command.install import install
from distutils.sysconfig import get_python_lib
import glob
import shutil
__library_file__ = './lib/g2o*.so'
__version__ = '0.0.1'
class CopyLibFile(install):
""""
Directly copy library file to python's site-packages directory.
"""
def run(self):
install_dir = get_python_lib()
lib_file = glob.glob(__library_file__)
assert len(lib_file) == 1
print('copying {} -> {}'.format(lib_file[0], install_dir))
shutil.copy(lib_file[0], install_dir)
setup(
name='g2opy',
version=__version__,
description='Python binding of C++ graph optimization framework g2o.',
url='https://github.com/uoip/g2opy',
license='BSD',
cmdclass=dict(
install=CopyLibFile
),
keywords='g2o, SLAM, BA, ICP, optimization, python, binding',
long_description="""This is a Python binding for c++ library g2o
(https://github.com/RainerKuemmerle/g2o).
g2o is an open-source C++ framework for optimizing graph-based nonlinear
error functions. g2o has been designed to be easily extensible to a wide
range of problems and a new problem typically can be specified in a few
lines of code. The current implementation provides solutions to several
variants of SLAM and BA."""
)