-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.py
33 lines (28 loc) · 934 Bytes
/
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
from pathlib import Path
from setuptools import setup
import re
_pwd = Path(__file__).parent.absolute()
def main():
cmdclass = dict()
version = None
init_path = _pwd / "radarfields" / "__init__.py"
with open(init_path, "r", encoding="utf-8") as f:
lines = f.readlines()
for line in lines:
match_res = re.match(r'^__version__ = "(.*)"', line)
if match_res:
version = match_res.group(1)
break
if version is None:
raise RuntimeError(f"Cannot find version from {init_path}")
print(f"Detected radarfields version: {version}")
_ = setup(
name="radarfields",
version=version,
description="Radar Fields: Frequency-Space Neural Scene Representations for FMCW Radar",
packages=["radarfields"],
cmdclass=cmdclass,
include_package_data=True,
)
if __name__ == "__main__":
main()