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