-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
76 lines (62 loc) · 2.57 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
from __future__ import annotations
import os
from pathlib import Path
from setuptools import find_packages, setup
def get_version():
if os.getenv("GITHUB_REF_TYPE", "branch") == "tag":
return os.environ["GITHUB_REF_NAME"]
version_file = here / "etl_entities" / "VERSION"
version = version_file.read_text().strip() # noqa: WPS410
build_num = os.environ.get("GITHUB_RUN_ID", "0")
branch_name = os.environ.get("GITHUB_REF_NAME", "")
if not branch_name:
return version
return f"{version}.dev{build_num}"
def parse_requirements(file: Path) -> list[str]:
lines = file.read_text().splitlines()
return [line.rstrip() for line in lines if line and not line.startswith("#")]
here = Path(__file__).parent.resolve()
requirements = parse_requirements(here / "requirements.txt")
long_description = here.joinpath("README.rst").read_text()
setup(
name="etl-entities",
version=get_version(),
author="DataOps.ETL",
author_email="[email protected]",
description="ETL Entities lib for onETL",
long_description=long_description,
long_description_content_type="text/x-rst",
license="Apache-2.0",
license_files=("LICENSE.txt",),
url="https://github.com/MobileTeleSystems/etl-entities",
packages=find_packages(exclude=["docs", "docs.*", "tests", "tests.*"]),
classifiers=[
"Development Status :: 5 - Production/Stable",
"Framework :: Pydantic",
"Framework :: Pydantic :: 1",
"Framework :: Pydantic :: 2",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Typing :: Typed",
],
project_urls={
"Documentation": "https://etl-entities.readthedocs.io/",
"Source": "https://github.com/MobileTeleSystems/etl-entities",
"CI/CD": "https://github.com/MobileTeleSystems/etl-entities/actions",
"Tracker": "https://github.com/MobileTeleSystems/etl-entities/issues",
},
entry_points={"tricoder_package_spy.register": ["etl-entities=etl_entities"]},
python_requires=">=3.7",
install_requires=requirements,
include_package_data=True,
zip_safe=False,
)