xref: /qemu/python/setup.cfg (revision 176c5490724b813704bd5b083b9f5c9b857fdaad)
1ea1213b7SJohn Snow[metadata]
2ea1213b7SJohn Snowname = qemu
33afc3290SJohn Snowversion = file:VERSION
4ea1213b7SJohn Snowmaintainer = QEMU Developer Team
5ea1213b7SJohn Snowmaintainer_email = qemu-devel@nongnu.org
6ea1213b7SJohn Snowurl = https://www.qemu.org/
7ea1213b7SJohn Snowdownload_url = https://www.qemu.org/download/
8ea1213b7SJohn Snowdescription = QEMU Python Build, Debug and SDK tooling.
9ea1213b7SJohn Snowlong_description = file:PACKAGE.rst
10ea1213b7SJohn Snowlong_description_content_type = text/x-rst
11ea1213b7SJohn Snowclassifiers =
12ea1213b7SJohn Snow    Development Status :: 3 - Alpha
13ea1213b7SJohn Snow    License :: OSI Approved :: GNU General Public License v2 (GPLv2)
14ea1213b7SJohn Snow    Natural Language :: English
15ea1213b7SJohn Snow    Operating System :: OS Independent
16ea1213b7SJohn Snow    Programming Language :: Python :: 3 :: Only
173c8de38cSJohn Snow    Programming Language :: Python :: 3.6
183c8de38cSJohn Snow    Programming Language :: Python :: 3.7
193c8de38cSJohn Snow    Programming Language :: Python :: 3.8
203c8de38cSJohn Snow    Programming Language :: Python :: 3.9
213c8de38cSJohn Snow    Programming Language :: Python :: 3.10
22ea1213b7SJohn Snow
23ea1213b7SJohn Snow[options]
24ea1213b7SJohn Snowpython_requires = >= 3.6
25ea1213b7SJohn Snowpackages =
26ea1213b7SJohn Snow    qemu.qmp
27ea1213b7SJohn Snow    qemu.machine
28ea1213b7SJohn Snow    qemu.utils
29ef42440dSJohn Snow
30dbe75f55SJohn Snow[options.extras_require]
31dbe75f55SJohn Snow# Run `pipenv lock --dev` when changing these requirements.
32dbe75f55SJohn Snowdevel =
3331622b2aSJohn Snow    avocado-framework >= 87.0
34dbe75f55SJohn Snow    flake8 >= 3.6.0
35c63f3b0bSJohn Snow    fusepy >= 2.0.4
36dbe75f55SJohn Snow    isort >= 5.1.2
37dbe75f55SJohn Snow    mypy >= 0.770
38dbe75f55SJohn Snow    pylint >= 2.8.0
393c8de38cSJohn Snow    tox >= 3.18.0
40dbe75f55SJohn Snow
41c63f3b0bSJohn Snow# Provides qom-fuse functionality
42c63f3b0bSJohn Snowfuse =
43c63f3b0bSJohn Snow    fusepy >= 2.0.4
44c63f3b0bSJohn Snow
457c4c595fSJohn Snow[options.entry_points]
467c4c595fSJohn Snowconsole_scripts =
477c4c595fSJohn Snow    qom = qemu.qmp.qom:main
487c4c595fSJohn Snow    qom-set = qemu.qmp.qom:QOMSet.entry_point
497c4c595fSJohn Snow    qom-get = qemu.qmp.qom:QOMGet.entry_point
507c4c595fSJohn Snow    qom-list = qemu.qmp.qom:QOMList.entry_point
517c4c595fSJohn Snow    qom-tree = qemu.qmp.qom:QOMTree.entry_point
52*176c5490SJohn Snow    qom-fuse = qemu.qmp.qom_fuse:QOMFuse.entry_point [fuse]
537c4c595fSJohn Snow
5481f8c446SJohn Snow[flake8]
5581f8c446SJohn Snowextend-ignore = E722  # Prefer pylint's bare-except checks to flake8's
5621d0b866SJohn Snowexclude = __pycache__,
5721d0b866SJohn Snow          .venv,
583c8de38cSJohn Snow          .tox,
5981f8c446SJohn Snow
60e941c844SJohn Snow[mypy]
61e941c844SJohn Snowstrict = True
62e941c844SJohn Snowpython_version = 3.6
63e941c844SJohn Snowwarn_unused_configs = True
640542a4c9SJohn Snownamespace_packages = True
65e941c844SJohn Snow
6630ec845cSJohn Snow[mypy-qemu.qmp.qom_fuse]
6730ec845cSJohn Snow# fusepy has no type stubs:
6830ec845cSJohn Snowallow_subclassing_any = True
6930ec845cSJohn Snow
7030ec845cSJohn Snow[mypy-fuse]
7130ec845cSJohn Snow# fusepy has no type stubs:
7230ec845cSJohn Snowignore_missing_imports = True
7330ec845cSJohn Snow
74ef42440dSJohn Snow[pylint.messages control]
75ef42440dSJohn Snow# Disable the message, report, category or checker with the given id(s). You
76ef42440dSJohn Snow# can either give multiple identifiers separated by comma (,) or put this
77ef42440dSJohn Snow# option multiple times (only on the command line, not in the configuration
78ef42440dSJohn Snow# file where it should appear only once). You can also use "--disable=all" to
79ef42440dSJohn Snow# disable everything first and then reenable specific checks. For example, if
80ef42440dSJohn Snow# you want to run only the similarities checker, you can use "--disable=all
81ef42440dSJohn Snow# --enable=similarities". If you want to run only the classes checker, but have
82ef42440dSJohn Snow# no Warning level messages displayed, use "--disable=all --enable=classes
83ef42440dSJohn Snow# --disable=W".
84ef42440dSJohn Snowdisable=too-many-arguments,
85ef42440dSJohn Snow        too-many-instance-attributes,
86ef42440dSJohn Snow        too-many-public-methods,
87ef42440dSJohn Snow
88ef42440dSJohn Snow[pylint.basic]
89ef42440dSJohn Snow# Good variable names which should always be accepted, separated by a comma.
90ef42440dSJohn Snowgood-names=i,
91ef42440dSJohn Snow           j,
92ef42440dSJohn Snow           k,
93ef42440dSJohn Snow           ex,
94ef42440dSJohn Snow           Run,
95d229f1c8SJohn Snow           _,   # By convention: Unused variable
96d229f1c8SJohn Snow           fh,  # fh = open(...)
97d229f1c8SJohn Snow           fd,  # fd = os.open(...)
98d229f1c8SJohn Snow           c,   # for c in string: ...
99ef42440dSJohn Snow
100ef42440dSJohn Snow[pylint.similarities]
101ef42440dSJohn Snow# Ignore imports when computing similarities.
102ef42440dSJohn Snowignore-imports=yes
103158ac451SJohn Snow
104158ac451SJohn Snow[isort]
105158ac451SJohn Snowforce_grid_wrap=4
106158ac451SJohn Snowforce_sort_within_sections=True
107158ac451SJohn Snowinclude_trailing_comma=True
108158ac451SJohn Snowline_length=72
109158ac451SJohn Snowlines_after_imports=2
110158ac451SJohn Snowmulti_line_output=3
1113c8de38cSJohn Snow
1123c8de38cSJohn Snow# tox (https://tox.readthedocs.io/) is a tool for running tests in
1133c8de38cSJohn Snow# multiple virtualenvs. This configuration file will run the test suite
1143c8de38cSJohn Snow# on all supported python versions. To use it, "pip install tox" and
1153c8de38cSJohn Snow# then run "tox" from this directory. You will need all of these versions
1163c8de38cSJohn Snow# of python available on your system to run this test.
1173c8de38cSJohn Snow
1183c8de38cSJohn Snow[tox:tox]
1193c8de38cSJohn Snowenvlist = py36, py37, py38, py39, py310
1203c8de38cSJohn Snow
1213c8de38cSJohn Snow[testenv]
1223c8de38cSJohn Snowallowlist_externals = make
123c63f3b0bSJohn Snowdeps =
124c63f3b0bSJohn Snow    .[devel]
125c63f3b0bSJohn Snow    .[fuse]  # Workaround to trigger tox venv rebuild
1263c8de38cSJohn Snowcommands =
1273c8de38cSJohn Snow    make check
128