xref: /openbmc/qemu/python/README.rst (revision 93128815af4efcaba03a5581c959bc7f98ee2725)
1QEMU Python Tooling
2===================
3
4This directory houses Python tooling used by the QEMU project to build,
5configure, and test QEMU. It is organized by namespace (``qemu``), and
6then by package (e.g. ``qemu/machine``, ``qemu/qmp``, etc).
7
8``setup.py`` is used by ``pip`` to install this tooling to the current
9environment. ``setup.cfg`` provides the packaging configuration used by
10``setup.py`` in a setuptools specific format. You will generally invoke
11it by doing one of the following:
12
131. ``pip3 install .`` will install these packages to your current
14   environment. If you are inside a virtual environment, they will
15   install there. If you are not, it will attempt to install to the
16   global environment, which is **not recommended**.
17
182. ``pip3 install --user .`` will install these packages to your user's
19   local python packages. If you are inside of a virtual environment,
20   this will fail; you likely want the first invocation above.
21
22If you append the ``-e`` argument, pip will install in "editable" mode;
23which installs a version of the package that installs a forwarder
24pointing to these files, such that the package always reflects the
25latest version in your git tree.
26
27See `Installing packages using pip and virtual environments
28<https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/>`_
29for more information.
30
31
32Files in this directory
33-----------------------
34
35- ``qemu/`` Python package source directory.
36- ``PACKAGE.rst`` is used as the README file that is visible on PyPI.org.
37- ``README.rst`` you are here!
38- ``VERSION`` contains the PEP-440 compliant version used to describe
39  this package; it is referenced by ``setup.cfg``.
40- ``setup.cfg`` houses setuptools package configuration.
41- ``setup.py`` is the setuptools installer used by pip; See above.
42