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