xref: /qemu/python/README.rst (revision dbe75f55)
193128815SJohn SnowQEMU Python Tooling
293128815SJohn Snow===================
393128815SJohn Snow
493128815SJohn SnowThis directory houses Python tooling used by the QEMU project to build,
593128815SJohn Snowconfigure, and test QEMU. It is organized by namespace (``qemu``), and
693128815SJohn Snowthen by package (e.g. ``qemu/machine``, ``qemu/qmp``, etc).
793128815SJohn Snow
893128815SJohn Snow``setup.py`` is used by ``pip`` to install this tooling to the current
993128815SJohn Snowenvironment. ``setup.cfg`` provides the packaging configuration used by
1093128815SJohn Snow``setup.py`` in a setuptools specific format. You will generally invoke
1193128815SJohn Snowit by doing one of the following:
1293128815SJohn Snow
1393128815SJohn Snow1. ``pip3 install .`` will install these packages to your current
1493128815SJohn Snow   environment. If you are inside a virtual environment, they will
1593128815SJohn Snow   install there. If you are not, it will attempt to install to the
1693128815SJohn Snow   global environment, which is **not recommended**.
1793128815SJohn Snow
1893128815SJohn Snow2. ``pip3 install --user .`` will install these packages to your user's
1993128815SJohn Snow   local python packages. If you are inside of a virtual environment,
2093128815SJohn Snow   this will fail; you likely want the first invocation above.
2193128815SJohn Snow
2293128815SJohn SnowIf you append the ``-e`` argument, pip will install in "editable" mode;
2393128815SJohn Snowwhich installs a version of the package that installs a forwarder
2493128815SJohn Snowpointing to these files, such that the package always reflects the
2593128815SJohn Snowlatest version in your git tree.
2693128815SJohn Snow
27*dbe75f55SJohn SnowInstalling ".[devel]" instead of "." will additionally pull in required
28*dbe75f55SJohn Snowpackages for testing this package. They are not runtime requirements,
29*dbe75f55SJohn Snowand are not needed to simply use these libraries.
30*dbe75f55SJohn Snow
3193128815SJohn SnowSee `Installing packages using pip and virtual environments
3293128815SJohn Snow<https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/>`_
3393128815SJohn Snowfor more information.
3493128815SJohn Snow
3593128815SJohn Snow
3693128815SJohn SnowFiles in this directory
3793128815SJohn Snow-----------------------
3893128815SJohn Snow
3993128815SJohn Snow- ``qemu/`` Python package source directory.
40eae4e442SJohn Snow- ``MANIFEST.in`` is read by python setuptools, it specifies additional files
41eae4e442SJohn Snow  that should be included by a source distribution.
4293128815SJohn Snow- ``PACKAGE.rst`` is used as the README file that is visible on PyPI.org.
4341c1d81cSJohn Snow- ``Pipfile`` is used by Pipenv to generate ``Pipfile.lock``.
4441c1d81cSJohn Snow- ``Pipfile.lock`` is a set of pinned package dependencies that this package
4541c1d81cSJohn Snow  is tested under in our CI suite. It is used by ``make venv-check``.
4693128815SJohn Snow- ``README.rst`` you are here!
4793128815SJohn Snow- ``VERSION`` contains the PEP-440 compliant version used to describe
4893128815SJohn Snow  this package; it is referenced by ``setup.cfg``.
4993128815SJohn Snow- ``setup.cfg`` houses setuptools package configuration.
5093128815SJohn Snow- ``setup.py`` is the setuptools installer used by pip; See above.
51