1[metadata] 2name = qemu 3version = file:VERSION 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 17 Programming Language :: Python :: 3.9 18 Programming Language :: Python :: 3.10 19 Programming Language :: Python :: 3.11 20 Programming Language :: Python :: 3.12 21 Programming Language :: Python :: 3.13 22 Typing :: Typed 23 24[options] 25python_requires = >= 3.9 26packages = 27 qemu.qmp 28 qemu.machine 29 qemu.utils 30 31[options.package_data] 32* = py.typed 33 34[options.extras_require] 35# Remember to update tests/minreqs.txt if changing anything below: 36devel = 37 avocado-framework >= 90.0 38 distlib >= 0.3.6 39 flake8 >= 5.0.4 40 fusepy >= 2.0.4 41 isort >= 5.1.2 42 mypy >= 1.4.0 43 pylint >= 2.17.3 44 pylint != 3.2.4; python_version<"3.9" 45 tox >= 3.18.0 46 urwid >= 2.1.2 47 urwid-readline >= 0.13 48 Pygments >= 2.9.0 49 50# Provides qom-fuse functionality 51fuse = 52 fusepy >= 2.0.4 53 54# QMP TUI dependencies 55tui = 56 urwid >= 2.1.2 57 urwid-readline >= 0.13 58 Pygments >= 2.9.0 59 60[options.entry_points] 61console_scripts = 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 69 qmp-shell = qemu.qmp.qmp_shell:main 70 qmp-shell-wrap = qemu.qmp.qmp_shell:main_wrap 71 qmp-tui = qemu.qmp.qmp_tui:main [tui] 72 73[flake8] 74# Prefer pylint's bare-except checks to flake8's 75extend-ignore = E722 76exclude = __pycache__, 77 78[mypy] 79strict = True 80python_version = 3.9 81warn_unused_configs = True 82namespace_packages = True 83warn_unused_ignores = False 84 85[mypy-qemu.utils.qom_fuse] 86# fusepy has no type stubs: 87allow_subclassing_any = True 88 89[mypy-qemu.qmp.qmp_tui] 90# urwid and urwid_readline have no type stubs: 91allow_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. 95[mypy-fuse] 96ignore_missing_imports = True 97 98[mypy-tomli] 99ignore_missing_imports = True 100 101[mypy-tomllib] 102ignore_missing_imports = True 103 104[mypy-urwid] 105ignore_missing_imports = True 106 107[mypy-urwid_readline] 108ignore_missing_imports = True 109 110[mypy-pygments] 111ignore_missing_imports = True 112 113[mypy-distlib] 114ignore_missing_imports = True 115 116[mypy-distlib.scripts] 117ignore_missing_imports = True 118 119[mypy-distlib.version] 120ignore_missing_imports = True 121 122[mypy-pip._vendor.distlib] 123ignore_missing_imports = True 124 125[mypy-pip._vendor.distlib.scripts] 126ignore_missing_imports = True 127 128[mypy-pip._vendor.distlib.version] 129ignore_missing_imports = True 130 131[pylint.messages control] 132# Disable the message, report, category or checker with the given id(s). You 133# can either give multiple identifiers separated by comma (,) or put this 134# option multiple times (only on the command line, not in the configuration 135# file where it should appear only once). You can also use "--disable=all" to 136# disable everything first and then reenable specific checks. For example, if 137# you want to run only the similarities checker, you can use "--disable=all 138# --enable=similarities". If you want to run only the classes checker, but have 139# no Warning level messages displayed, use "--disable=all --enable=classes 140# --disable=W". 141disable=consider-using-f-string, 142 consider-using-with, 143 too-many-arguments, 144 too-many-positional-arguments, 145 too-many-function-args, # mypy handles this with less false positives. 146 too-many-instance-attributes, 147 no-member, # mypy also handles this better. 148 149[pylint.basic] 150# Good variable names which should always be accepted, separated by a comma. 151good-names=i, 152 j, 153 k, 154 ex, 155 Run, 156 _, # By convention: Unused variable 157 fh, # fh = open(...) 158 fd, # fd = os.open(...) 159 c, # for c in string: ... 160 T, # for TypeVars. See pylint#3401 161 SocketAddrT, # Not sure why this is invalid. 162 163[pylint.similarities] 164# Ignore imports when computing similarities. 165ignore-imports=yes 166ignore-signatures=yes 167 168# Minimum lines number of a similarity. 169# TODO: Remove after we opt in to Pylint 2.8.3. See commit msg. 170min-similarity-lines=6 171 172 173[isort] 174force_grid_wrap=4 175force_sort_within_sections=True 176include_trailing_comma=True 177line_length=72 178lines_after_imports=2 179multi_line_output=3 180 181# tox (https://tox.readthedocs.io/) is a tool for running tests in 182# multiple virtualenvs. This configuration file will run the test suite 183# on all supported python versions. To use it, "pip install tox" and 184# then run "tox" from this directory. You will need all of these versions 185# of python available on your system to run this test. 186 187[tox:tox] 188envlist = py39, py310, py311, py312, py313 189skip_missing_interpreters = true 190 191[testenv] 192allowlist_externals = make 193deps = 194 .[devel] 195 .[fuse] # Workaround to trigger tox venv rebuild 196 .[tui] # Workaround to trigger tox venv rebuild 197commands = 198 make check 199 200# Coverage.py [https://coverage.readthedocs.io/en/latest/] is a tool for 201# measuring code coverage of Python programs. It monitors your program, 202# noting which parts of the code have been executed, then analyzes the 203# source to identify code that could have been executed but was not. 204 205[coverage:run] 206concurrency = multiprocessing 207source = qemu/ 208parallel = true 209