-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
executable file
·90 lines (82 loc) · 2.64 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#!/usr/bin/env python
"""Setup script"""
from setuptools import setup, find_packages
from setuptools.extension import Extension
from setuptools import dist
dist.Distribution().fetch_build_eggs(['numpy'])
import numpy as np # pylint: disable=wrong-import-position
dist.Distribution().fetch_build_eggs(['Cython>=0.15.1'])
from Cython.Build import cythonize # pylint: disable=wrong-import-position
from Cython.Compiler import Options # pylint: disable=wrong-import-position
dist.Distribution().fetch_build_eggs(['farms_core'])
from farms_core import get_include_paths # pylint: disable=wrong-import-position
# Cython options
DEBUG = False
Options.docstrings = True
Options.embed_pos_in_docstring = False
Options.generate_cleanup_code = False
Options.clear_to_none = True
Options.annotate = False
Options.fast_fail = False
Options.warning_errors = False
Options.error_on_unknown_names = True
Options.error_on_uninitialized = True
Options.convert_range = True
Options.cache_builtins = True
Options.gcc_branch_hints = True
Options.lookup_module_cpdef = False
Options.embed = None
Options.cimport_from_pyx = False
Options.buffer_max_dims = 8
Options.closure_freelist_size = 8
setup(
name='farms_mujoco',
version='0.1',
author='farmsdev',
author_email='[email protected]',
description='FARMS package for running simulations with MuJoCo',
keywords='farms simulation mujoco',
packages=find_packages(),
package_dir={'farms_mujoco': 'farms_mujoco'},
package_data={'farms_mujoco': [
f'{folder}/*.pxd'
for folder in ['sensors', 'swimming']
]},
include_package_data=True,
include_dirs=[np.get_include()] + get_include_paths(),
ext_modules=cythonize(
[
Extension(
f'farms_mujoco.{folder}.*',
sources=[f'farms_mujoco/{folder}/*.pyx'],
extra_compile_args=['-O3'], # , '-fopenmp'
extra_link_args=['-O3'] # , '-fopenmp'
)
for folder in ['sensors', 'swimming']
],
include_path=[np.get_include()] + get_include_paths(),
compiler_directives={
'embedsignature': True,
'cdivision': True,
'language_level': 3,
'infer_types': True,
'profile': False,
'wraparound': False,
'boundscheck': DEBUG,
'nonecheck': DEBUG,
'initializedcheck': DEBUG,
'overflowcheck': DEBUG,
}
),
zip_safe=False,
install_requires=[
'farms_core',
'cython',
'numpy',
'scipy',
'tqdm',
'trimesh',
'dm_control',
'imageio',
],
)