Companion repo: https://github.com/konstin/ndeiabc
I have this pyproject.toml:
[project]
name = "ndeiabc"
version = "0.1.1"
description = "new default extra is a breaking change"
requires-python = ">=3.12"
dependencies = []
default-optional-dependencies = [
"recommended",
]
[project.optional-dependencies]
recommended = ["numpy>=2,<3", "tqdm>4,<=5"]
minimal = []
[build-system]
requires = ["setuptools @ git+https://github.com/wheel-next/setuptools.git@pep_771"]
build-backend = "setuptools.build_meta"
And this test script:
#!/bin/bash
set -e
rm -rf .venv
virtualenv .venv
.venv/bin/pip config set --site global.extra-index-url https://wheel-next.github.io/mockhouse/pep-771/
.venv/bin/pip install pep-771
echo "=========================="
.venv/bin/pip --version
echo "=========================="
pip install "ndeiabc[minimal]==0.1.1" --no-cache --find-links dist
If i run the script i get
==========================
pip 25.0.dev0+pep-771 from /home/konsti/projects/ndeiabc/.venv/lib/python3.13/site-packages/pip (python 3.13)
==========================
Looking in indexes: https://pypi.org/simple, https://wheel-next.github.io/mockhouse/pep-771/
Looking in links: dist
Processing ./dist/ndeiabc-0.1.1-py3-none-any.whl (from ndeiabc[minimal]==0.1.1)
Collecting numpy<3,>=2 (from ndeiabc==0.1.1->ndeiabc[minimal]==0.1.1)
Downloading numpy-2.2.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (62 kB)
Collecting tqdm<=5,>4 (from ndeiabc==0.1.1->ndeiabc[minimal]==0.1.1)
Downloading tqdm-4.67.1-py3-none-any.whl.metadata (57 kB)
Downloading numpy-2.2.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.1 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 16.1/16.1 MB 12.3 MB/s eta 0:00:00
Downloading tqdm-4.67.1-py3-none-any.whl (78 kB)
Installing collected packages: tqdm, numpy, ndeiabc
Successfully installed ndeiabc-0.1.1 numpy-2.2.2 tqdm-4.67.1
It seems that the patched pip always installs the default requirements?
For context, the METADATA of the wheel:
Metadata-Version: 2.5
Name: ndeiabc
Version: 0.1.1
Summary: new default extra is a breaking change
Requires-Python: >=3.12
Default-Extra: recommended
Provides-Extra: recommended
Requires-Dist: numpy<3,>=2; extra == "recommended"
Requires-Dist: tqdm<=5,>4; extra == "recommended"
Provides-Extra: minimal
Companion repo: https://github.com/konstin/ndeiabc
I have this pyproject.toml:
And this test script:
If i run the script i get
It seems that the patched pip always installs the default requirements?
For context, the METADATA of the wheel: