import os import sys try: from setuptools import setup, find_packages except ImportError: from distutils.core import setup, find_packages if 'SETUP_PY_NO_CHECK' not in os.environ: script_path = os.path.abspath(os.path.realpath(__file__)) install_path = os.path.abspath(os.path.realpath(os.path.join('${GTSAM_CYTHON_INSTALL_PATH}', 'setup.py'))) if script_path != install_path: print('setup.py is being run from an unexpected location: "{}"'.format(script_path)) print('please run `make install` and run the script from there') sys.exit(1) packages = find_packages() setup( name='gtsam', description='Georgia Tech Smoothing And Mapping library', url='https://bitbucket.org/gtborg/gtsam', version='${GTSAM_VERSION_STRING}', # https://www.python.org/dev/peps/pep-0440/ license='Simplified BSD license', keywords='slam sam robotics localization mapping optimization', long_description='''${README_CONTENTS}''', # https://pypi.org/pypi?%3Aaction=list_classifiers classifiers=[ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Education', 'Intended Audience :: Developers', 'Intended Audience :: Science/Research', 'Operating System :: MacOS', 'Operating System :: Microsoft :: Windows', 'Operating System :: POSIX', 'License :: OSI Approved :: BSD License', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 3', ], packages=packages, package_data={package: [f for f in os.listdir(package.replace('.', os.path.sep)) if os.path.splitext(f)[1] in ('.so', '.dll')] for package in packages }, install_requires=[line.strip() for line in ''' ${CYTHON_INSTALL_REQUIREMENTS} '''.splitlines() if len(line.strip()) > 0 and not line.strip().startswith('#')] )