Skip to content

Commit

Permalink
feat(docs): describe when the Python interpreter must be bundled
Browse files Browse the repository at this point in the history
  • Loading branch information
tigarmo committed Mar 6, 2024
1 parent 025ea03 commit d40d350
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions docs/reference/plugins/python_plugin.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,23 @@

.. include:: /common/craft-parts/python_plugin.rst
:end-before: .. _python-details-begin:

Dependencies
------------

Whether the Python interpreter needs to be included in the snap depends on its
``confinement``. Specifically:

- Projects with ``strict`` or ``devmode`` confinement can safely use the base
snap's interpreter, so they typically do **not** need to include Python.
- Projects with ``classic`` confinement **cannot** use the base snap's
interpreter, and thus must always bundle it (typically via ``stage-packages``).
- In both cases, a specific/custom Python installation can always be included
in the snap. This can be useful, for example, when using a different Python
version or building an interpreter with custom flags.

Snapcraft will prefer an included interpreter over the base's, even for projects
with ``strict`` and ``devmode`` confinement.

.. include:: /common/craft-parts/python_plugin.rst
:start-after: .. _python-details-end:

0 comments on commit d40d350

Please sign in to comment.