-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup.py
42 lines (38 loc) · 1.48 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
#!/usr/bin/env python
import warnings
from setuptools import setup, find_packages
if __name__ == "__main__":
with open("README.md", "r") as f:
long_description = f.read()
setup_config = dict(
name="hand_embodiment",
version="0.2.0",
maintainer="Alexander Fabisch",
maintainer_email="[email protected]",
description="Embodiment mapping for robotic hands from human hand motions",
long_description=long_description,
long_description_content_type="text/markdown",
license="None",
packages=find_packages(),
package_data={"hand_embodiment": ["model/*"]},
install_requires=["numpy", "scipy", "pytransform3d", "open3d",
"pyyaml", "tqdm", "numba", "pandas"],
extras_require={
"test": ["pytest", "pytest-cov"],
"doc": ["sphinx"]}
)
try:
from Cython.Build import cythonize
import numpy
cython_config = dict(
ext_modules=cythonize("hand_embodiment/mano_fast.pyx"),
zip_safe=False,
compiler_directives={"language_level": "3"},
include_dirs=[numpy.get_include()],
extra_compile_args=["-O3", "-Wno-cpp", "-Wno-unused-function"]
)
setup_config.update(cython_config)
except ImportError:
warnings.warn("Cython or NumPy is not available. "
"Install it if you want the fast MANO model.")
setup(**setup_config)