-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
46 lines (33 loc) · 1.21 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
#!/usr/bin/env python
"""Setup hulc installation."""
from os import path as op
import re
from setuptools import find_packages, setup
def _read(f):
return open(op.join(op.dirname(__file__), f)).read() if op.exists(f) else ""
_meta = _read("hulc/__init__.py")
def find_meta(_meta, string):
l_match = re.search(r"^" + string + r'\s*=\s*"(.*)"', _meta, re.M)
if l_match:
return l_match.group(1)
raise RuntimeError(f"Unable to find {string} string.")
install_requires = [
l for l in _read("requirements.txt").split("\n") if l and not l.startswith("#") and not l.startswith("-")
]
meta = dict(
name=find_meta(_meta, "__project__"),
version=find_meta(_meta, "__version__"),
license=find_meta(_meta, "__license__"),
description="Hierarchical Universal Language Conditioned Policies",
platforms=("Any"),
zip_safe=False,
keywords="pytorch hulc".split(),
author=find_meta(_meta, "__author__"),
author_email=find_meta(_meta, "__email__"),
url=" https://github.com/mees/hulc",
packages=find_packages(exclude=["tests"]),
install_requires=install_requires,
)
if __name__ == "__main__":
print("find_package", find_packages(exclude=["tests"]))
setup(**meta)