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