xref: /qemu/python/setup.cfg (revision 5c66d7d8de9a00460199669d26cd83fba135bee5)
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
227f179082SJohn Snow    Typing :: Typed
23ea1213b7SJohn Snow
24ea1213b7SJohn Snow[options]
25ea1213b7SJohn Snowpython_requires = >= 3.6
26ea1213b7SJohn Snowpackages =
27ea1213b7SJohn Snow    qemu.qmp
28ea1213b7SJohn Snow    qemu.machine
29ea1213b7SJohn Snow    qemu.utils
30a093a655SJohn Snow    qemu.aqmp
31ef42440dSJohn Snow
327f179082SJohn Snow[options.package_data]
337f179082SJohn Snow* = py.typed
347f179082SJohn Snow
35dbe75f55SJohn Snow[options.extras_require]
363afa3501SJohn Snow# For the devel group, When adding new dependencies or bumping the minimum
373afa3501SJohn Snow# version, use e.g. "pipenv install --dev pylint==3.0.0".
383afa3501SJohn Snow# Subsequently, edit 'Pipfile' to remove e.g. 'pylint = "==3.0.0'.
39dbe75f55SJohn Snowdevel =
404320f717SJohn Snow    avocado-framework >= 90.0
41dbe75f55SJohn Snow    flake8 >= 3.6.0
42c63f3b0bSJohn Snow    fusepy >= 2.0.4
43dbe75f55SJohn Snow    isort >= 5.1.2
4474a1505dSJohn Snow    mypy >= 0.780
45dbe75f55SJohn Snow    pylint >= 2.8.0
463c8de38cSJohn Snow    tox >= 3.18.0
47974e2f47SG S Niteesh Babu    urwid >= 2.1.2
48974e2f47SG S Niteesh Babu    urwid-readline >= 0.13
49f37c34d6SG S Niteesh Babu    Pygments >= 2.9.0
50dbe75f55SJohn Snow
51c63f3b0bSJohn Snow# Provides qom-fuse functionality
52c63f3b0bSJohn Snowfuse =
53c63f3b0bSJohn Snow    fusepy >= 2.0.4
54c63f3b0bSJohn Snow
55974e2f47SG S Niteesh Babu# AQMP TUI dependencies
56974e2f47SG S Niteesh Babutui =
57974e2f47SG S Niteesh Babu    urwid >= 2.1.2
58974e2f47SG S Niteesh Babu    urwid-readline >= 0.13
59f37c34d6SG S Niteesh Babu    Pygments >= 2.9.0
60974e2f47SG S Niteesh Babu
617c4c595fSJohn Snow[options.entry_points]
627c4c595fSJohn Snowconsole_scripts =
630347c4c4SJohn Snow    qom = qemu.utils.qom:main
640347c4c4SJohn Snow    qom-set = qemu.utils.qom:QOMSet.entry_point
650347c4c4SJohn Snow    qom-get = qemu.utils.qom:QOMGet.entry_point
660347c4c4SJohn Snow    qom-list = qemu.utils.qom:QOMList.entry_point
670347c4c4SJohn Snow    qom-tree = qemu.utils.qom:QOMTree.entry_point
680347c4c4SJohn Snow    qom-fuse = qemu.utils.qom_fuse:QOMFuse.entry_point [fuse]
690347c4c4SJohn Snow    qemu-ga-client = qemu.utils.qemu_ga_client:main
70fd9c3a62SJohn Snow    qmp-shell = qemu.aqmp.qmp_shell:main
7143912529SDaniel P. Berrangé    qmp-shell-wrap = qemu.aqmp.qmp_shell:main_wrap
7235755f7dSG S Niteesh Babu    aqmp-tui = qemu.aqmp.aqmp_tui:main [tui]
737c4c595fSJohn Snow
7481f8c446SJohn Snow[flake8]
7581f8c446SJohn Snowextend-ignore = E722  # Prefer pylint's bare-except checks to flake8's
7621d0b866SJohn Snowexclude = __pycache__,
7781f8c446SJohn Snow
78e941c844SJohn Snow[mypy]
79e941c844SJohn Snowstrict = True
80e941c844SJohn Snowpython_version = 3.6
81e941c844SJohn Snowwarn_unused_configs = True
820542a4c9SJohn Snownamespace_packages = True
83e941c844SJohn Snow
840347c4c4SJohn Snow[mypy-qemu.utils.qom_fuse]
8530ec845cSJohn Snow# fusepy has no type stubs:
8630ec845cSJohn Snowallow_subclassing_any = True
8730ec845cSJohn Snow
88aeb6b48aSG S Niteesh Babu[mypy-qemu.aqmp.aqmp_tui]
89aeb6b48aSG S Niteesh Babu# urwid and urwid_readline have no type stubs:
90aeb6b48aSG S Niteesh Babuallow_subclassing_any = True
91aeb6b48aSG S Niteesh Babu
92aeb6b48aSG S Niteesh Babu# The following missing import directives are because these libraries do not
93aeb6b48aSG S Niteesh Babu# provide type stubs. Allow them on an as-needed basis for mypy.
9430ec845cSJohn Snow[mypy-fuse]
95aeb6b48aSG S Niteesh Babuignore_missing_imports = True
96aeb6b48aSG S Niteesh Babu
97aeb6b48aSG S Niteesh Babu[mypy-urwid]
98aeb6b48aSG S Niteesh Babuignore_missing_imports = True
99aeb6b48aSG S Niteesh Babu
100aeb6b48aSG S Niteesh Babu[mypy-urwid_readline]
10130ec845cSJohn Snowignore_missing_imports = True
10230ec845cSJohn Snow
103f37c34d6SG S Niteesh Babu[mypy-pygments]
104f37c34d6SG S Niteesh Babuignore_missing_imports = True
105f37c34d6SG S Niteesh Babu
106ef42440dSJohn Snow[pylint.messages control]
107ef42440dSJohn Snow# Disable the message, report, category or checker with the given id(s). You
108ef42440dSJohn Snow# can either give multiple identifiers separated by comma (,) or put this
109ef42440dSJohn Snow# option multiple times (only on the command line, not in the configuration
110ef42440dSJohn Snow# file where it should appear only once). You can also use "--disable=all" to
111ef42440dSJohn Snow# disable everything first and then reenable specific checks. For example, if
112ef42440dSJohn Snow# you want to run only the similarities checker, you can use "--disable=all
113ef42440dSJohn Snow# --enable=similarities". If you want to run only the classes checker, but have
114ef42440dSJohn Snow# no Warning level messages displayed, use "--disable=all --enable=classes
115ef42440dSJohn Snow# --disable=W".
116eb8033f6SJohn Snowdisable=consider-using-f-string,
117*5c66d7d8SDaniel P. Berrangé        consider-using-with,
118*5c66d7d8SDaniel P. Berrangé        too-many-arguments,
11929a8ea9bSJohn Snow        too-many-function-args,  # mypy handles this with less false positives.
120*5c66d7d8SDaniel P. Berrangé        too-many-instance-attributes,
1214cd17f37SJohn Snow        no-member,  # mypy also handles this better.
122ef42440dSJohn Snow
123ef42440dSJohn Snow[pylint.basic]
124ef42440dSJohn Snow# Good variable names which should always be accepted, separated by a comma.
125ef42440dSJohn Snowgood-names=i,
126ef42440dSJohn Snow           j,
127ef42440dSJohn Snow           k,
128ef42440dSJohn Snow           ex,
129ef42440dSJohn Snow           Run,
130d229f1c8SJohn Snow           _,   # By convention: Unused variable
131d229f1c8SJohn Snow           fh,  # fh = open(...)
132d229f1c8SJohn Snow           fd,  # fd = os.open(...)
133d229f1c8SJohn Snow           c,   # for c in string: ...
13435b9a85aSJohn Snow           T,   # for TypeVars. See pylint#3401
135ef42440dSJohn Snow
136ef42440dSJohn Snow[pylint.similarities]
137ef42440dSJohn Snow# Ignore imports when computing similarities.
138ef42440dSJohn Snowignore-imports=yes
1395690b437SJohn Snowignore-signatures=yes
140158ac451SJohn Snow
14122305c2aSJohn Snow# Minimum lines number of a similarity.
14222305c2aSJohn Snow# TODO: Remove after we opt in to Pylint 2.8.3. See commit msg.
14322305c2aSJohn Snowmin-similarity-lines=6
14422305c2aSJohn Snow
14522305c2aSJohn Snow
146158ac451SJohn Snow[isort]
147158ac451SJohn Snowforce_grid_wrap=4
148158ac451SJohn Snowforce_sort_within_sections=True
149158ac451SJohn Snowinclude_trailing_comma=True
150158ac451SJohn Snowline_length=72
151158ac451SJohn Snowlines_after_imports=2
152158ac451SJohn Snowmulti_line_output=3
1533c8de38cSJohn Snow
1543c8de38cSJohn Snow# tox (https://tox.readthedocs.io/) is a tool for running tests in
1553c8de38cSJohn Snow# multiple virtualenvs. This configuration file will run the test suite
1563c8de38cSJohn Snow# on all supported python versions. To use it, "pip install tox" and
1573c8de38cSJohn Snow# then run "tox" from this directory. You will need all of these versions
1583c8de38cSJohn Snow# of python available on your system to run this test.
1593c8de38cSJohn Snow
1603c8de38cSJohn Snow[tox:tox]
1613c8de38cSJohn Snowenvlist = py36, py37, py38, py39, py310
1626f651a6dSWainer dos Santos Moschettaskip_missing_interpreters = true
1633c8de38cSJohn Snow
1643c8de38cSJohn Snow[testenv]
1653c8de38cSJohn Snowallowlist_externals = make
166c63f3b0bSJohn Snowdeps =
167c63f3b0bSJohn Snow    .[devel]
168c63f3b0bSJohn Snow    .[fuse]  # Workaround to trigger tox venv rebuild
169974e2f47SG S Niteesh Babu    .[tui]   # Workaround to trigger tox venv rebuild
1701e4d8b31SJohn Snow    setuptools < 60  # Workaround, please see commit msg.
1713c8de38cSJohn Snowcommands =
1723c8de38cSJohn Snow    make check
173a4ffaecdSJohn Snow
174a4ffaecdSJohn Snow# Coverage.py [https://coverage.readthedocs.io/en/latest/] is a tool for
175a4ffaecdSJohn Snow# measuring code coverage of Python programs. It monitors your program,
176a4ffaecdSJohn Snow# noting which parts of the code have been executed, then analyzes the
177a4ffaecdSJohn Snow# source to identify code that could have been executed but was not.
178a4ffaecdSJohn Snow
179a4ffaecdSJohn Snow[coverage:run]
180a4ffaecdSJohn Snowconcurrency = multiprocessing
181a4ffaecdSJohn Snowsource = qemu/
182a4ffaecdSJohn Snowparallel = true
183