setup.cfg 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  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.8
  18. Programming Language :: Python :: 3.9
  19. Programming Language :: Python :: 3.10
  20. Programming Language :: Python :: 3.11
  21. Programming Language :: Python :: 3.12
  22. Programming Language :: Python :: 3.13
  23. Typing :: Typed
  24. [options]
  25. python_requires = >= 3.8
  26. packages =
  27. qemu.qmp
  28. qemu.machine
  29. qemu.utils
  30. [options.package_data]
  31. * = py.typed
  32. [options.extras_require]
  33. # Remember to update tests/minreqs.txt if changing anything below:
  34. devel =
  35. avocado-framework >= 90.0
  36. distlib >= 0.3.6
  37. flake8 >= 5.0.4
  38. fusepy >= 2.0.4
  39. isort >= 5.1.2
  40. mypy >= 1.4.0
  41. pylint >= 2.17.3
  42. pylint != 3.2.4; python_version<"3.9"
  43. tox >= 3.18.0
  44. urwid >= 2.1.2
  45. urwid-readline >= 0.13
  46. Pygments >= 2.9.0
  47. # Provides qom-fuse functionality
  48. fuse =
  49. fusepy >= 2.0.4
  50. # QMP TUI dependencies
  51. tui =
  52. urwid >= 2.1.2
  53. urwid-readline >= 0.13
  54. Pygments >= 2.9.0
  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. qmp-shell = qemu.qmp.qmp_shell:main
  65. qmp-shell-wrap = qemu.qmp.qmp_shell:main_wrap
  66. qmp-tui = qemu.qmp.qmp_tui:main [tui]
  67. [flake8]
  68. # Prefer pylint's bare-except checks to flake8's
  69. extend-ignore = E722
  70. exclude = __pycache__,
  71. [mypy]
  72. strict = True
  73. python_version = 3.8
  74. warn_unused_configs = True
  75. namespace_packages = True
  76. warn_unused_ignores = False
  77. [mypy-qemu.utils.qom_fuse]
  78. # fusepy has no type stubs:
  79. allow_subclassing_any = True
  80. [mypy-qemu.qmp.qmp_tui]
  81. # urwid and urwid_readline have no type stubs:
  82. allow_subclassing_any = True
  83. # The following missing import directives are because these libraries do not
  84. # provide type stubs. Allow them on an as-needed basis for mypy.
  85. [mypy-fuse]
  86. ignore_missing_imports = True
  87. [mypy-tomli]
  88. ignore_missing_imports = True
  89. [mypy-tomllib]
  90. ignore_missing_imports = True
  91. [mypy-urwid]
  92. ignore_missing_imports = True
  93. [mypy-urwid_readline]
  94. ignore_missing_imports = True
  95. [mypy-pygments]
  96. ignore_missing_imports = True
  97. [mypy-distlib]
  98. ignore_missing_imports = True
  99. [mypy-distlib.scripts]
  100. ignore_missing_imports = True
  101. [mypy-distlib.version]
  102. ignore_missing_imports = True
  103. [mypy-pip._vendor.distlib]
  104. ignore_missing_imports = True
  105. [mypy-pip._vendor.distlib.scripts]
  106. ignore_missing_imports = True
  107. [mypy-pip._vendor.distlib.version]
  108. ignore_missing_imports = True
  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. [pylint.basic]
  127. # Good variable names which should always be accepted, separated by a comma.
  128. good-names=i,
  129. j,
  130. k,
  131. ex,
  132. Run,
  133. _, # By convention: Unused variable
  134. fh, # fh = open(...)
  135. fd, # fd = os.open(...)
  136. c, # for c in string: ...
  137. T, # for TypeVars. See pylint#3401
  138. SocketAddrT, # Not sure why this is invalid.
  139. [pylint.similarities]
  140. # Ignore imports when computing similarities.
  141. ignore-imports=yes
  142. ignore-signatures=yes
  143. # Minimum lines number of a similarity.
  144. # TODO: Remove after we opt in to Pylint 2.8.3. See commit msg.
  145. min-similarity-lines=6
  146. [isort]
  147. force_grid_wrap=4
  148. force_sort_within_sections=True
  149. include_trailing_comma=True
  150. line_length=72
  151. lines_after_imports=2
  152. multi_line_output=3
  153. # tox (https://tox.readthedocs.io/) is a tool for running tests in
  154. # multiple virtualenvs. This configuration file will run the test suite
  155. # on all supported python versions. To use it, "pip install tox" and
  156. # then run "tox" from this directory. You will need all of these versions
  157. # of python available on your system to run this test.
  158. [tox:tox]
  159. envlist = py38, py39, py310, py311, py312, py313
  160. skip_missing_interpreters = true
  161. [testenv]
  162. allowlist_externals = make
  163. deps =
  164. .[devel]
  165. .[fuse] # Workaround to trigger tox venv rebuild
  166. .[tui] # Workaround to trigger tox venv rebuild
  167. commands =
  168. make check
  169. # Coverage.py [https://coverage.readthedocs.io/en/latest/] is a tool for
  170. # measuring code coverage of Python programs. It monitors your program,
  171. # noting which parts of the code have been executed, then analyzes the
  172. # source to identify code that could have been executed but was not.
  173. [coverage:run]
  174. concurrency = multiprocessing
  175. source = qemu/
  176. parallel = true