-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
45 lines (39 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
from setuptools import setup, Extension
from setuptools.command.build_ext import build_ext
import sys, os
import setuptools
absolute_path = os.path.dirname(os.path.abspath(__file__))
class get_pybind_include(object):
"""Helper class to determine the pybind11 include path
The purpose of this class is to postpone importing pybind11
until it is actually installed, so that the `get_include()`
method can be invoked."""
def __str__(self):
import pybind11
return pybind11.get_include()
ext_modules = [
Extension(
'l2f',
['src/bindings/l2f.cpp'],
include_dirs=[
get_pybind_include(),
os.path.join(absolute_path, "include"),
os.path.join(absolute_path, "external", "rl_tools", "include"),
os.path.join(absolute_path, "external", "rl_tools", "external", "json", "include"),
],
language='c++',
extra_compile_args=['-std=c++17'] if not sys.platform.startswith('win') else ['/std:c++17'],
define_macros=[('RL_TOOLS_ENABLE_JSON', None)]
),
]
print("include_dirs: ", ext_modules[0].include_dirs)
setup(
name='l2f',
version='0.0.1',
author='Jonas Eschmann',
description='Learning to Fly in Seconds',
long_description='',
ext_modules=ext_modules,
cmdclass={'build_ext': build_ext},
zip_safe=False,
)