-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
38 lines (30 loc) · 1.06 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
import re
from setuptools import find_packages, setup
def get_version() -> str:
with open("heimdall/__init__.py", "r") as f:
content = f.read()
# Use a regular expression to extract the version
version_match = re.search(r"__version__\s*=\s*['\"]([^'\"]+)['\"]", content)
if version_match:
return version_match.group(1)
else:
raise ValueError("Version not found in __init__.py")
# Read the dependencies from requirements.txt
with open("requirements.txt") as f:
requirements = f.read().splitlines()
setup(
name="heimdall",
version=get_version(),
packages=find_packages(),
install_requires=requirements,
author="Kanishk Navale",
author_email="[email protected]",
description="Base package for probabilistic deep learning framework.",
long_description=open("Readme.md").read(),
classifiers=[
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.10",
],
)