-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
38 lines (30 loc) · 1.02 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
# SPDX-FileCopyrightText: Copyright (c) 2024 MBition GmbH.
# SPDX-License-Identifier: MIT
import os
from datetime import datetime
from pathlib import Path
from setuptools import find_packages, setup
def read_requirements() -> list[str]:
requirements_file = Path("requirements.txt")
with requirements_file.open() as file:
return file.readlines()
def get_version() -> str:
timestamp = datetime.now().strftime("%Y%m%d%H%M%S")
return os.environ.get("CI_COMMIT_TAG", default=f"v0.0.{timestamp}")
setup(
packages=find_packages(
include=["src*"],
exclude=["tests*"],
),
version=get_version(),
install_requires=read_requirements(),
keywords=["python", "nerdt", "mercedes-benz"],
classifiers=[
"Development Status :: 1 - Alpha",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Ubuntu :: Linux",
"Operating System :: Microsoft :: Windows",
],
)