-
Notifications
You must be signed in to change notification settings - Fork 3
/
setup_local.py
41 lines (29 loc) · 1.06 KB
/
setup_local.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
#!/usr/bin/env python
"""Setup hulc2 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("hulc2/__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.")
meta = dict(
name=find_meta(_meta, "__project__"),
version=find_meta(_meta, "__version__"),
license=find_meta(_meta, "__license__"),
description="Grounding Language with Visual Affordances over Unstructured Data",
platforms=("Any"),
zip_safe=False,
keywords="pytorch hulc2".split(),
author=find_meta(_meta, "__author__"),
author_email=find_meta(_meta, "__email__"),
url=" https://github.com/mees/hulc2",
packages=find_packages(exclude=["tests"]),
)
if __name__ == "__main__":
print("find_package", find_packages(exclude=["tests"]))
setup(**meta)