-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathsetup.py
65 lines (56 loc) · 1.8 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
import pathlib
from setuptools import setup, find_packages
here = pathlib.Path(__file__).parent
def read_version() -> str:
file_path = here / "version"
with open(file_path) as version_file:
return version_file.read().strip()
def development_status(version: str) -> str:
if "a" in version:
dev_status = "Development Status :: 3 - Alpha"
elif "dev" in version or "rc" in version:
dev_status = "Development Status :: 4 - Beta"
else:
dev_status = "Development Status :: 5 - Production/Stable"
return dev_status
def long_description(short_description: str) -> str:
readme_path = here / "README.md"
try:
with open(readme_path, encoding="utf-8") as readme:
long_description = "\n" + readme.read()
return long_description
except FileNotFoundError:
return short_description
NAME = "pulse-api"
DESCRIPTION = "Python API for Pulse Robotic Arm with useful utilities"
URL = "https://rozum.com"
EMAIL = "[email protected]"
AUTHOR = "Rozum Robotics"
VERSION = read_version()
DEVELOPMENT_STATUS = development_status(VERSION)
LONG_DESCRIPTION = long_description(DESCRIPTION)
REQUIRED = [
"pdhttp == 1.8.4",
"Deprecated == 1.2.6",
]
setup(
name=NAME,
version=VERSION,
packages=find_packages(),
install_requires=REQUIRED,
url=URL,
license="Apache License 2.0",
classifiers=[
"License :: OSI Approved :: Apache Software License",
DEVELOPMENT_STATUS,
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: Implementation :: CPython",
],
author=AUTHOR,
author_email=EMAIL,
description=DESCRIPTION,
long_description=LONG_DESCRIPTION,
long_description_content_type="text/markdown",
zip_safe=False,
)