Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Self-Referential Extras

Created to support pypa/packaging.python.org#2087

CI matrix for checking package managers' support for self-referential extras: optional dependencies that refer back to the same package with other extras. Workflows run weekly with the latest release version of each package manager.

Current status

Conda does not support extras before CEP 44 implementation

pip uv poetry pdm pipenv hatch whl2conda

Commands for the test cases

Tool add install sync
pip - python -m pip install "${WHEEL}[all]" -
uv uv add "${WHEEL}[all]" uv pip install --system "${WHEEL}[all]" uv lock
uv sync
poetry poetry add "${WHEEL}[all]" - poetry lock
poetry sync --no-root
pdm pdm add "${WHEEL}[all]" - pdm lock
pdm sync
pipenv - pipenv install "${WHEEL}[all]" pipenv lock
pipenv sync
hatch - - hatch env lock
hatch dep sync
whl2conda - whl2conda convert "$WHEEL" --resolve-extras
whl2conda install "$CONDA_PKG" --create -n self_ref_extras --yes
-

Package extras

[project.optional-dependencies]
test = ["pytest"]
format = ["ruff"]
docs = ["sphinx"]
dev = [
  "self-referential-extras[test]",
  "self-referential-extras[format]",
]
all = ["self-referential-extras[test,format,docs]"]

Installing self-referential-extras[all] should pull in pytest, ruff, and sphinx.

When was this supported?

This part may contain errors, it's kinda like my personal notes~

Tool Version Release Date Related PRs
pip 21.2 2021.07 Not Intentional
pipenv 2022.8.15 2022.08 Not Intentional
pdm 2.3.1 2022.12 #1481, #1541
uv 0.5.27 2025.02 #11142
poetry 2.1.0 2025.02 #10106
hatch 1.16.3 2026.01 #2127
whl2conda - - -

About

Just testing which package installers support self-referential extras currently.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Contributors

Languages