-
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathsetup.py
More file actions
93 lines (78 loc) · 2.66 KB
/
setup.py
File metadata and controls
93 lines (78 loc) · 2.66 KB
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
# setup.py
# Standard installation script
#
# - License : MIT - See LICENSE file.
# - Project : Scrutiny Debugger (github.com/scrutinydebugger/scrutiny-main)
#
# Copyright (c) 2021 Scrutiny Debugger
#type: ignore
from setuptools import setup, find_packages #type:ignore
import sys
import os
os.chdir(os.path.dirname(__file__))
import scrutiny
ADD_ENTRY_POINTS=bool(int(os.environ.get('SCRUTINY_ADD_ENTRYPOINTS', 1)))
print(f"ADD_ENTRY_POINTS={ADD_ENTRY_POINTS}")
entry_points = {}
if ADD_ENTRY_POINTS:
entry_points={
"console_scripts": [
f"scrutiny=scrutiny.__main__:scrutiny_cli",
f"scrutiny_server=scrutiny.__main__:scrutiny_server",
f"scrutiny_gui=scrutiny.__main__:scrutiny_gui_with_server",
]
}
dependencies = [
'appdirs==1.4.4',
'pyelftools==0.32',
'pyserial==3.5',
'pylink-square==1.3.0',
'PySide6-QtAds==4.4.0',
'PySide6==6.9.0',
'python-can==4.5.0'
]
if sys.version_info < (3,11):
dependencies.append("typing-extensions==4.12.2")
doc_dependencies = []
if (sys.version_info.major, sys.version_info.minor) >= (3, 9):
doc_dependencies = [
'sphinx-book-theme==1.1.2',
'sphinx==7.2.6'
]
def get_gui_assets():
asset_dir = os.path.abspath(os.path.join('scrutiny', 'gui', 'assets'))
if not os.path.isfile(os.path.join(asset_dir, '__init__.py')):
raise RuntimeError(f"GUI asset path does not exists {asset_dir}")
def generate():
for dirpath, _, files in os.walk(asset_dir):
for file in files:
if not file.endswith(('.py', '.pyc')):
yield os.path.join(dirpath, file)
return list(generate())
setup(
name="scrutinydebugger",
python_requires='>=3.10,<3.14',
description='Scrutiny Debugger Python framework',
url='https://github.com/scrutinydebugger/scrutiny-main',
version=scrutiny.__version__,
author=scrutiny.__author__,
license=scrutiny.__license__,
packages=find_packages(where='.', exclude=["test", "test.*"], include=['scrutiny', "scrutiny.*"]),
package_data = {
'scrutiny': ['py.typed'] + get_gui_assets() + [scrutiny.expected_user_guide_path()],
},
setup_requires=[],
install_requires=dependencies,
extras_require={
'test': ['mypy', 'coverage'] + doc_dependencies,
'dev': ['mypy', 'ipdb', 'autopep8', 'coverage'] + doc_dependencies,
'doc' : doc_dependencies,
'build': [
'nuitka==2.6.9', # 2.7.3- is broken on Linux/Mac.
'imageio==2.37.0',
'build==1.2.2',
'pip-licenses==5.0.0'
] + doc_dependencies
},
entry_points=entry_points,
)