-
Notifications
You must be signed in to change notification settings - Fork 139
/
Copy pathsetup.py
44 lines (36 loc) · 1.58 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
import os
import platform
import subprocess
from skbuild import setup
this_directory = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(this_directory, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
version = subprocess.check_output(["git", "describe", "--tags", "--long"])
version = version.strip().decode('utf-8').replace("-", ".")[1:]
version = version[:version.rfind("g")-1]
pysurvive_path = this_directory + '/bindings/python/pysurvive/'
cmake_args = ['-DPYTHON_GENERATED_DIR="' + pysurvive_path + '"',
"-DDOWNLOAD_EIGEN=ON",
"-DUSE_EIGEN=ON",
"-DBUILD_APPLICATIONS=OFF",
"-DLIB_INSTALL_DIR=bindings/python/pysurvive/"]
if platform.system() != 'Windows':
cmake_args.append('-DUSE_EIGEN=ON')
description = """Libsurvive is a set of tools and libraries that enable 6 DoF tracking
on lighthouse and vive based systems that is completely open source and can run on
any device. It currently supports both SteamVR 1.0 and SteamVR 2.0 generation of
devices and should support any tracked object commercially available."""
setup(name='pysurvive',
version=version,
long_description=long_description,
long_description_content_type='text/markdown',
description=description,
url='https://github.com/cntools/libsurvive',
packages=['pysurvive'],
package_dir={'pysurvive': 'bindings/python/pysurvive'},
package_data={'pysurvive': ['images/*']},
install_requires=['gooey'],
include_package_data=False,
license='MIT',
cmake_args=cmake_args
)