Skip to content

build(pyproject): declare requires-python via PEP 621 [project] metadata#2213

Open
chid wants to merge 1 commit intopython-visualization:mainfrom
chid:chore/add-pep621-requires-python
Open

build(pyproject): declare requires-python via PEP 621 [project] metadata#2213
chid wants to merge 1 commit intopython-visualization:mainfrom
chid:chore/add-pep621-requires-python

Conversation

@chid
Copy link

@chid chid commented Mar 8, 2026

Add a minimal [project] table to pyproject.toml and set:

  • requires-python = ">=3.9"
  • name = "folium"
  • dynamic = [...] for fields still sourced from setup.py

Why this is needed:

python_requires in setup.py is not enough for tools that read interpreter constraints from pyproject.toml metadata. Per PEP 621, requires-python belongs in [project], which allows uv to resolve/lock against the correct Python range instead of defaulting incorrectly (see astral-sh/uv#11424).

…etadata

  Add a minimal `[project]` table to `pyproject.toml` and set:

  - `requires-python = ">=3.9"`
  - `name = "folium"`
  - `dynamic = [...]` for fields still sourced from `setup.py`

  Why this is needed:
  `python_requires` in `setup.py` is not enough for tools that read interpreter
  constraints from `pyproject.toml` metadata. Per PEP 621, `requires-python`
  belongs in `[project]`, which allows `uv` to resolve/lock against the correct
  Python range instead of defaulting incorrectly (see
  astral-sh/uv#11424).
@chid chid marked this pull request as ready for review March 8, 2026 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants