-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.py
executable file
·124 lines (102 loc) · 2.74 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
#!/usr/bin/env python3
# SPDX-License-Identifier: BSD-3-Clause
from typing import Callable, TypeAlias, Type
from setuptools import setup, find_packages
from pathlib import Path
ScmVersion: TypeAlias = Type['setuptools_scm.version.ScmVersion']
REPO_ROOT = Path(__file__).parent
README_FILE = (REPO_ROOT / 'README.md')
def vcs_ver() -> dict[str, str | Callable[[ScmVersion], str]]:
def scheme(version: ScmVersion) -> str:
if version.tag and not version.distance:
return version.format_with('')
else:
return version.format_choice('+{node}', '+{node}.dirty')
return {
'relative_to': __file__,
'version_scheme': 'guess-next-dev',
'local_scheme': scheme
}
def doc_ver() -> str:
try:
from setuptools_scm.git import parse as parse_git
except ImportError:
return ''
git = parse_git('.')
if not git:
return ''
elif git.exact:
return git.format_with('{tag}')
else:
return 'latest'
setup(
name = 'Squishy',
use_scm_version = vcs_ver(),
author = 'Aki \'lethalbit\' Van Ness',
author_email = '[email protected]',
description = 'SCSI Multitool and Torii HDL Library',
license = 'BSD-3-Clause',
python_requires = '~=3.10',
zip_safe = True,
url = 'https://github.com/squishy-scsi/squishy',
long_description = README_FILE.read_text(),
long_description_content_type = 'text/markdown',
setup_requires = [
'wheel',
'setuptools',
'setuptools_scm'
],
install_requires = [
'Jinja2',
'construct>=2.10.67',
'arrow',
'libusb1>=1.8.1',
'rich',
'torii>=0.6.0,<1.0',
'usb-construct<1.0',
'sol-usb>=0.4.0,<1.0',
'platformdirs~=4.2.1'
],
packages = find_packages(
where = '.',
exclude = (
'tests', 'tests.*', 'examples', 'examples.*'
)
),
package_data = { },
extras_require = {
'dev': [
'nox',
'setuptools_scm'
],
'firmware': [
'meson',
]
},
entry_points = {
'console_scripts': [
'squishy = squishy.cli:main',
]
},
classifiers = [
'Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: Developers',
'Intended Audience :: Information Technology',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: BSD License',
'Operating System :: MacOS :: MacOS X',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Topic :: Software Development',
'Topic :: System :: Hardware',
],
project_urls = {
'Documentation': 'https://docs.scsi.moe/',
'Source Code' : 'https://github.com/squishy-scsi/squishy',
'Bug Tracker' : 'https://github.com/squishy-scsi/squishy/issues',
}
)