]> git.proxmox.com Git - mirror_qemu.git/blame - python/setup.cfg
Python: Drop support for Python 3.7
[mirror_qemu.git] / python / setup.cfg
CommitLineData
ea1213b7
JS
1[metadata]
2name = qemu
3afc3290 3version = file:VERSION
ea1213b7
JS
4maintainer = QEMU Developer Team
5maintainer_email = qemu-devel@nongnu.org
6url = https://www.qemu.org/
7download_url = https://www.qemu.org/download/
8description = QEMU Python Build, Debug and SDK tooling.
9long_description = file:PACKAGE.rst
10long_description_content_type = text/x-rst
11classifiers =
12 Development Status :: 3 - Alpha
13 License :: OSI Approved :: GNU General Public License v2 (GPLv2)
14 Natural Language :: English
15 Operating System :: OS Independent
16 Programming Language :: Python :: 3 :: Only
3c8de38c
JS
17 Programming Language :: Python :: 3.8
18 Programming Language :: Python :: 3.9
19 Programming Language :: Python :: 3.10
519f3cfc 20 Programming Language :: Python :: 3.11
7f179082 21 Typing :: Typed
ea1213b7
JS
22
23[options]
ca056f44 24python_requires = >= 3.8
ea1213b7 25packages =
37094b6d 26 qemu.qmp
ea1213b7
JS
27 qemu.machine
28 qemu.utils
ef42440d 29
7f179082
JS
30[options.package_data]
31* = py.typed
32
dbe75f55 33[options.extras_require]
6832189f 34# Remember to update tests/minreqs.txt if changing anything below:
dbe75f55 35devel =
4320f717 36 avocado-framework >= 90.0
c5538eed 37 distlib >= 0.3.6
7b4b98c4 38 flake8 >= 5.0.4
c63f3b0b 39 fusepy >= 2.0.4
dbe75f55 40 isort >= 5.1.2
3d7b8974 41 mypy >= 1.4.0
7b4b98c4 42 pylint >= 2.17.3
3c8de38c 43 tox >= 3.18.0
974e2f47
NB
44 urwid >= 2.1.2
45 urwid-readline >= 0.13
f37c34d6 46 Pygments >= 2.9.0
dbe75f55 47
c63f3b0b
JS
48# Provides qom-fuse functionality
49fuse =
50 fusepy >= 2.0.4
51
b1a9b1f7 52# QMP TUI dependencies
974e2f47
NB
53tui =
54 urwid >= 2.1.2
55 urwid-readline >= 0.13
f37c34d6 56 Pygments >= 2.9.0
974e2f47 57
7c4c595f
JS
58[options.entry_points]
59console_scripts =
0347c4c4
JS
60 qom = qemu.utils.qom:main
61 qom-set = qemu.utils.qom:QOMSet.entry_point
62 qom-get = qemu.utils.qom:QOMGet.entry_point
63 qom-list = qemu.utils.qom:QOMList.entry_point
64 qom-tree = qemu.utils.qom:QOMTree.entry_point
65 qom-fuse = qemu.utils.qom_fuse:QOMFuse.entry_point [fuse]
66 qemu-ga-client = qemu.utils.qemu_ga_client:main
37094b6d
JS
67 qmp-shell = qemu.qmp.qmp_shell:main
68 qmp-shell-wrap = qemu.qmp.qmp_shell:main_wrap
b1a9b1f7 69 qmp-tui = qemu.qmp.qmp_tui:main [tui]
7c4c595f 70
81f8c446 71[flake8]
745d58f7
JS
72# Prefer pylint's bare-except checks to flake8's
73extend-ignore = E722
21d0b866 74exclude = __pycache__,
81f8c446 75
e941c844
JS
76[mypy]
77strict = True
ca056f44 78python_version = 3.8
e941c844 79warn_unused_configs = True
0542a4c9 80namespace_packages = True
e7874a50 81warn_unused_ignores = False
e941c844 82
0347c4c4 83[mypy-qemu.utils.qom_fuse]
30ec845c
JS
84# fusepy has no type stubs:
85allow_subclassing_any = True
86
b1a9b1f7 87[mypy-qemu.qmp.qmp_tui]
aeb6b48a
NB
88# urwid and urwid_readline have no type stubs:
89allow_subclassing_any = True
90
91# The following missing import directives are because these libraries do not
92# provide type stubs. Allow them on an as-needed basis for mypy.
30ec845c 93[mypy-fuse]
aeb6b48a
NB
94ignore_missing_imports = True
95
71ed611c
PB
96[mypy-tomli]
97ignore_missing_imports = True
98
99[mypy-tomllib]
100ignore_missing_imports = True
101
aeb6b48a
NB
102[mypy-urwid]
103ignore_missing_imports = True
104
105[mypy-urwid_readline]
30ec845c
JS
106ignore_missing_imports = True
107
f37c34d6
NB
108[mypy-pygments]
109ignore_missing_imports = True
110
dd84028f
JS
111[mypy-importlib.metadata]
112ignore_missing_imports = True
113
114[mypy-importlib_metadata]
115ignore_missing_imports = True
116
117[mypy-pkg_resources]
118ignore_missing_imports = True
119
c5538eed
JS
120[mypy-distlib]
121ignore_missing_imports = True
122
92834894
JS
123[mypy-distlib.scripts]
124ignore_missing_imports = True
125
c5538eed
JS
126[mypy-distlib.version]
127ignore_missing_imports = True
128
68ea6d17
JS
129[mypy-pip._vendor.distlib]
130ignore_missing_imports = True
131
68ea6d17
JS
132[mypy-pip._vendor.distlib.scripts]
133ignore_missing_imports = True
134
135[mypy-pip._vendor.distlib.version]
136ignore_missing_imports = True
137
ef42440d
JS
138[pylint.messages control]
139# Disable the message, report, category or checker with the given id(s). You
140# can either give multiple identifiers separated by comma (,) or put this
141# option multiple times (only on the command line, not in the configuration
142# file where it should appear only once). You can also use "--disable=all" to
143# disable everything first and then reenable specific checks. For example, if
144# you want to run only the similarities checker, you can use "--disable=all
145# --enable=similarities". If you want to run only the classes checker, but have
146# no Warning level messages displayed, use "--disable=all --enable=classes
147# --disable=W".
eb8033f6 148disable=consider-using-f-string,
5c66d7d8
DB
149 consider-using-with,
150 too-many-arguments,
29a8ea9b 151 too-many-function-args, # mypy handles this with less false positives.
5c66d7d8 152 too-many-instance-attributes,
4cd17f37 153 no-member, # mypy also handles this better.
ef42440d
JS
154
155[pylint.basic]
156# Good variable names which should always be accepted, separated by a comma.
157good-names=i,
158 j,
159 k,
160 ex,
161 Run,
d229f1c8
JS
162 _, # By convention: Unused variable
163 fh, # fh = open(...)
164 fd, # fd = os.open(...)
165 c, # for c in string: ...
35b9a85a 166 T, # for TypeVars. See pylint#3401
6c2537d3 167 SocketAddrT, # Not sure why this is invalid.
ef42440d
JS
168
169[pylint.similarities]
170# Ignore imports when computing similarities.
171ignore-imports=yes
5690b437 172ignore-signatures=yes
158ac451 173
22305c2a
JS
174# Minimum lines number of a similarity.
175# TODO: Remove after we opt in to Pylint 2.8.3. See commit msg.
176min-similarity-lines=6
177
178
158ac451
JS
179[isort]
180force_grid_wrap=4
181force_sort_within_sections=True
182include_trailing_comma=True
183line_length=72
184lines_after_imports=2
185multi_line_output=3
3c8de38c
JS
186
187# tox (https://tox.readthedocs.io/) is a tool for running tests in
188# multiple virtualenvs. This configuration file will run the test suite
189# on all supported python versions. To use it, "pip install tox" and
190# then run "tox" from this directory. You will need all of these versions
191# of python available on your system to run this test.
192
193[tox:tox]
ca056f44 194envlist = py38, py39, py310, py311
6f651a6d 195skip_missing_interpreters = true
3c8de38c
JS
196
197[testenv]
198allowlist_externals = make
c63f3b0b
JS
199deps =
200 .[devel]
201 .[fuse] # Workaround to trigger tox venv rebuild
974e2f47 202 .[tui] # Workaround to trigger tox venv rebuild
3c8de38c
JS
203commands =
204 make check
a4ffaecd
JS
205
206# Coverage.py [https://coverage.readthedocs.io/en/latest/] is a tool for
207# measuring code coverage of Python programs. It monitors your program,
208# noting which parts of the code have been executed, then analyzes the
209# source to identify code that could have been executed but was not.
210
211[coverage:run]
212concurrency = multiprocessing
213source = qemu/
214parallel = true