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