-
Notifications
You must be signed in to change notification settings - Fork 42
/
setup.py
60 lines (50 loc) · 1.61 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
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
import os
import pathlib
from pathlib import Path
from setuptools import find_packages, setup
def package_files(directory):
paths = []
for path, _, filenames in os.walk(directory):
for filename in filenames:
paths.append(os.path.join("..", path, filename))
return paths
def get_version():
"""Gets the benchmarl version."""
path = CWD / "benchmarl" / "__init__.py"
content = path.read_text()
for line in content.splitlines():
if line.startswith("__version__"):
return line.strip().split()[-1].strip().strip('"')
raise RuntimeError("bad version data in __init__.py")
CWD = pathlib.Path(__file__).absolute().parent
extra_files = package_files(
str(
Path(os.path.dirname(os.path.realpath(__file__)))
/ Path("benchmarl")
/ Path("conf")
)
)
setup(
name="benchmarl",
version=get_version(),
description="BenchMARL",
url="https://github.com/facebookresearch/BenchMARL",
author="Matteo Bettini",
author_email="[email protected]",
install_requires=["torchrl~=0.6.0", "tqdm", "hydra-core"],
extras_require={
"vmas": ["vmas>=1.3.4"],
"pettingzoo": ["pettingzoo[all]>=1.24.3"],
"meltingpot": ["dm-meltingpot"],
"gnn": ["torch_geometric"],
"logging": ["moviepy", "wandb", "torchvision"],
},
packages=find_packages(),
include_package_data=True,
package_data={"": extra_files},
)