forked from collabora/libsurvive
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
41 lines (33 loc) · 1.69 KB
/
Copy pathsetup.py
File metadata and controls
41 lines (33 loc) · 1.69 KB
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
import platform
from setuptools import dist, find_packages
dist.Distribution().fetch_build_eggs(['wheel', 'cmake_setuptools'])
dist.Distribution().fetch_build_eggs(['cmake_setuptools', 'scikit-build'])
from skbuild import setup
import os
import subprocess
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"]).strip().decode('utf-8').replace("-", ".")[1:]
version = version[:version.rfind("g")-1]
cmake_args=['-DPYTHON_GENERATED_DIR="'+ os.path.dirname(os.path.abspath(__file__))+'/bindings/python/pysurvive/"',
"-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')
setup(name='pysurvive',
version=version,
long_description=long_description,
long_description_content_type='text/markdown',
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.',
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
)