forked from MyoHub/myosuite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
66 lines (55 loc) · 2.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# -*- coding: utf-8 -*-
# Copyright (c) Facebook, Inc. and its affiliates
# Authors :: Vikash Kumar ([email protected]), Vittorio Caggiano ([email protected])
#
# This source code is licensed under the Apache 2 license found in the
# LICENSE file in the root directory of this source tree.
import os
import sys
from setuptools import setup, find_packages
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "myosuite"))
if sys.version_info.major != 3:
print("This Python is only compatible with Python 3, but you are running "
"Python {}. The installation will likely fail.".format(sys.version_info.major))
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
def fetch_requirements():
with open("requirements.txt") as f:
reqs = f.read().strip().split("\n")
return reqs
def get_version(rel_path):
for line in read(rel_path).splitlines():
if line.startswith('__version__'):
delim = '"' if '"' in line else "'"
return line.split(delim)[1]
else:
raise RuntimeError("Unable to find version string.")
def package_files(directory, ends_with):
paths = []
for (path, directories, filenames) in os.walk(directory):
for filename in filenames:
if filename.endswith(ends_with):
paths.append(os.path.join('..', path, filename))
return paths
mjc_models_files = package_files('myosuite/envs/myo/assets/','.mjb')
if __name__ == "__main__":
setup(
name="MyoSuite",
version=get_version("myosuite/__init__.py"),
author='MyoSuite Authors - Vikash Kumar (Meta AI), Vittorio Caggiano (Meta AI), Huawei Wang (University of Twente), Guillaume Durandau (University of Twente), Massimo Sartori (University of Twente)',
author_email="[email protected]",
license='Apache 2.0',
description='Musculoskeletal environments simulated in MuJoCo',
long_description=read('README.md'),
long_description_content_type="text/markdown",
classifiers=[
"Programming Language :: Python :: 3.7",
"License :: OSI Approved :: Apache Software License",
"Topic :: Scientific/Engineering :: Artificial Intelligence ",
"Operating System :: OS Independent",
],
package_data={'': mjc_models_files},
packages=find_packages(exclude=("myosuite.tests", "myosuite.agents")),
python_requires=">=3.7.1",
install_requires=fetch_requirements(),
)