Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PEP 735: Add include-project to Deferred Ideas #4012

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions peps/pep-0735.rst
Original file line number Diff line number Diff line change
Expand Up @@ -790,6 +790,38 @@ Compared with changes to ``[project.dependencies]`` and
Therefore, given that this PEP declines to make changes to the ``[project]``
table, changing ``[build-system]`` is also deferred.


Why not support a Dependency Group which includes the current project?
----------------------------------------------------------------------

Several usage scenarios for dependency groups revolve around installing a
dependency group alongside a package defined in the ``[project]`` table.
For example, testing a package involves installing testing dependencies and the
package itself. Additionally, the compatibility of a dependency group with the
main package is a valuable input to lockfile generators.

In such cases, it is be desirable for a Dependency Group to declare that it
brettcannon marked this conversation as resolved.
Show resolved Hide resolved
depends upon the project itself. Example syntaxes from discussion included
brettcannon marked this conversation as resolved.
Show resolved Hide resolved
``{include-project = true}`` and ``{include-group = ":project:"}``.

However, if a specification is established to extend :pep:`508` with Path
Dependencies, this would result in Dependency Groups having two ways of
specifying the main package. For example, if ``.`` becomes formally supported,
and ``{include-project = true}`` is included in this PEP, then dependency
groups may specify any of the following groups

.. code-block:: toml

[dependency-groups]
case1 = [{include-project = true}]
case2 = ["."]
case3 = [{include-project = true}, "."]
case4 = [{include-project = false}, "."]

In order to avoid a confusing future in which multiple different options
specify the package defined in ``pyproject.toml``, any syntax for declaring
this relationship is omitted from this PEP.

.. _prior_art:

Appendix A: Prior Art in Non-Python Languages
Expand Down
Loading