-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathsetup.py
More file actions
48 lines (40 loc) · 1.3 KB
/
setup.py
File metadata and controls
48 lines (40 loc) · 1.3 KB
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
import os
import re
import codecs
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
def read_requirements(path):
with open(path, "r") as f:
return [
line.strip()
for line in f.readlines()
if line.strip() and not line.startswith("#")
]
requirements = read_requirements("requirements.txt")
readme_path = os.path.join(here, "README.md")
if os.path.exists(readme_path):
with open(readme_path, encoding="utf-8") as f:
long_description = f.read()
else:
long_description = ""
with codecs.open(
os.path.join(here, "subnet58/__init__.py"), encoding="utf-8"
) as init_file:
version_match = re.search(
r"^__version__ = ['\"]([^'\"]*)['\"]", init_file.read(), re.M
)
version_string = version_match.group(1)
setup(
name="subnet58",
version=version_string,
description="Handshake58 - Bittensor Subnet 58: DRAIN Protocol scoring for AI providers",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/Handshake58/HS58-subnet",
author="Handshake58",
packages=find_packages(),
include_package_data=True,
license="PolyForm-Shield-1.0.0",
python_requires=">=3.9",
install_requires=requirements,
)