-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
56 lines (44 loc) · 1.49 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
47
48
49
50
51
52
53
54
55
56
import pathlib
from typing import List, Callable
from setuptools import setup, find_packages
BASE_DIR = pathlib.Path(__file__).parent.absolute()
def get_version() -> str:
with open(BASE_DIR / "VERSION") as file:
return file.readline().strip()
def get_licence() -> str:
with open(BASE_DIR / "LICENCE") as file:
return file.readline().strip()
def get_desc() -> str:
with open(BASE_DIR / "README.md") as file:
return file.readline().strip()
def get_packages() -> list[Callable[[str | None], str]]:
with open(BASE_DIR / "requirements.txt") as file:
return [
package.strip for package in file if package or not package.startswith("#")
]
setup(
name="anet",
version=get_version(),
author="OLeg",
author_email="[email protected]",
url="doc.site.com",
packages=find_packages(".", include=["anet"], exclude=["*tests*.py,*tests*"]),
package_dir={"": "."},
include_package_data=True,
license=get_licence(),
description="anet",
long_description=get_desc(),
long_description_content_tipe="text/markdown",
install_requeres=get_packages(),
python_requeres=">=3.10",
classifiers=[
"Development Status :: 3 - Alpha"
if "dev" in get_version()
else "Development Status :: 4 Beta"
if "rc" in get_version()
else "Development Status :: 5 Production/Stable"
],
# entry_points = {
# "console_scripts": ["a_net = anet.app:run"]
# }
)