aboutsummaryrefslogtreecommitdiff
path: root/pw_build/python.rst
diff options
context:
space:
mode:
Diffstat (limited to 'pw_build/python.rst')
-rw-r--r--pw_build/python.rst31
1 files changed, 26 insertions, 5 deletions
diff --git a/pw_build/python.rst b/pw_build/python.rst
index 3a50a75b1..473d2ed5c 100644
--- a/pw_build/python.rst
+++ b/pw_build/python.rst
@@ -239,6 +239,7 @@ Example
"//tools:another_pw_python_package",
"//:my_product_packages",
]
+ pip_generate_hashes = true
}
Arguments
@@ -261,11 +262,15 @@ Arguments
``pw_build_PIP_REQUIREMENTS`` GN args see:
:ref:`docs-python-build-python-gn-requirements-files`
+- ``pip_generate_hashes``: (Default: false) Use ``--generate-hashes`` When
+ running `pip-compile <A list of requirements files to install into this
+ virtualenv>`_ to compute the final ``requirements.txt``
+
- ``source_packages``: A list of in-tree
:ref:`module-pw_build-pw_python_package` or targets that will be checked for
external third_party pip dependencies to install into this
virtualenv. Note this list of targets isn't actually installed into the
- virtualenv. Only packages defined inside the [options] install_requires
+ virtualenv. Only packages defined inside the ``[options] install_requires``
section of each pw_python_package's setup.cfg will be pip installed.
.. seealso::
@@ -274,6 +279,7 @@ Arguments
setup.cfg files
<https://setuptools.pypa.io/en/latest/userguide/declarative_config.html>`_
+- ``output_logs``: (Default: true) If this is true then the virtual environment will output to logs.
.. _module-pw_build-pw_python_pip_install:
@@ -430,10 +436,25 @@ Arguments
and ``version`` strings. The ``common_config_file`` should contain the
required fields in the ``metadata`` and ``options`` sections as shown in
`Configuring setup() using setup.cfg files <https://setuptools.pypa.io/en/latest/userguide/declarative_config.html>`_.
- ``append_git_sha_to_version = true`` and ``append_date_to_version = true``
- will optionally append the current git SHA or date to the package version
- string after a ``+`` sign. You can also opt to include a generated
- ``pyproject.toml`` file by setting ``include_default_pyproject_file = true``.
+
+ This scope can optionally include:
+
+ - ``append_git_sha_to_version = true``: Append the current git SHA to the
+ package version string after a ``+`` sign.
+
+ - ``append_date_to_version = true``: Append the current date to the package
+ version string after a ``+`` sign.
+
+ - ``include_default_pyproject_file = true``: Include a standard
+ ``pyproject.toml`` file in the output.
+
+ - ``include_extra_files_in_package_data = true``: Add any ``extra_files``
+ entries to the generated ``setup.cfg`` file under the
+ ``[options.package_data]`` section.
+
+ - ``auto_create_package_data_init_py_files = true``: (Default: true) Create
+ ``__init__.py`` files as needed in all subdirs of ``extra_files`` when
+ including in ``[options.package_data]``.
.. code-block::
:caption: :octicon:`file;1em` Example using a common setup.cfg and