xref: /openbmc/qemu/python/setup.cfg (revision 9510e4fb)
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.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
22
23[options]
24python_requires = >= 3.6
25packages =
26    qemu.qmp
27    qemu.machine
28    qemu.utils
29
30[options.extras_require]
31# Run `pipenv lock --dev` when changing these requirements.
32devel =
33    avocado-framework >= 87.0
34    flake8 >= 3.6.0
35    fusepy >= 2.0.4
36    isort >= 5.1.2
37    mypy >= 0.770
38    pylint >= 2.8.0
39    tox >= 3.18.0
40
41# Provides qom-fuse functionality
42fuse =
43    fusepy >= 2.0.4
44
45[options.entry_points]
46console_scripts =
47    qom = qemu.qmp.qom:main
48    qom-set = qemu.qmp.qom:QOMSet.entry_point
49    qom-get = qemu.qmp.qom:QOMGet.entry_point
50    qom-list = qemu.qmp.qom:QOMList.entry_point
51    qom-tree = qemu.qmp.qom:QOMTree.entry_point
52    qom-fuse = qemu.qmp.qom_fuse:QOMFuse.entry_point [fuse]
53
54[flake8]
55extend-ignore = E722  # Prefer pylint's bare-except checks to flake8's
56exclude = __pycache__,
57          .venv,
58          .tox,
59
60[mypy]
61strict = True
62python_version = 3.6
63warn_unused_configs = True
64namespace_packages = True
65
66[mypy-qemu.qmp.qom_fuse]
67# fusepy has no type stubs:
68allow_subclassing_any = True
69
70[mypy-fuse]
71# fusepy has no type stubs:
72ignore_missing_imports = True
73
74[pylint.messages control]
75# Disable the message, report, category or checker with the given id(s). You
76# can either give multiple identifiers separated by comma (,) or put this
77# option multiple times (only on the command line, not in the configuration
78# file where it should appear only once). You can also use "--disable=all" to
79# disable everything first and then reenable specific checks. For example, if
80# you want to run only the similarities checker, you can use "--disable=all
81# --enable=similarities". If you want to run only the classes checker, but have
82# no Warning level messages displayed, use "--disable=all --enable=classes
83# --disable=W".
84disable=too-many-arguments,
85        too-many-instance-attributes,
86        too-many-public-methods,
87
88[pylint.basic]
89# Good variable names which should always be accepted, separated by a comma.
90good-names=i,
91           j,
92           k,
93           ex,
94           Run,
95           _,   # By convention: Unused variable
96           fh,  # fh = open(...)
97           fd,  # fd = os.open(...)
98           c,   # for c in string: ...
99
100[pylint.similarities]
101# Ignore imports when computing similarities.
102ignore-imports=yes
103
104[isort]
105force_grid_wrap=4
106force_sort_within_sections=True
107include_trailing_comma=True
108line_length=72
109lines_after_imports=2
110multi_line_output=3
111
112# tox (https://tox.readthedocs.io/) is a tool for running tests in
113# multiple virtualenvs. This configuration file will run the test suite
114# on all supported python versions. To use it, "pip install tox" and
115# then run "tox" from this directory. You will need all of these versions
116# of python available on your system to run this test.
117
118[tox:tox]
119envlist = py36, py37, py38, py39, py310
120
121[testenv]
122allowlist_externals = make
123deps =
124    .[devel]
125    .[fuse]  # Workaround to trigger tox venv rebuild
126commands =
127    make check
128