Skip to content

Migrate from setup.cfg to pyproject.toml #33577

Open
@tobiasdiez

Description

Starting with v61, setuptools (experimentally) support pyproject.toml for configuration, see pypa/setuptools#1688.

setuptools 68.1.0 declared support for pyproject.toml as stable.

Moreover, setup.cfg will eventually be deprecated so it's a good idea to migrate from cfg to toml.

Migration can be done mostly automatically using https://ini2toml.readthedocs.io/en/latest/readme.html:

  (cd pkgs/sage-conf && ini2toml setup.cfg > pyproject.toml && git rm -f setup.cfg && git add pyproject.toml)

  (cd pkgs/sagemath-objects && (echo && echo '[project]' && ini2toml -p setup.cfg setup.cfg.m4 | sed "1,/[[]project/d;s/\"esys/esys/;s/install-requires /install-requires-toml /;s/ *\\\\\\\\\"/\')/;/conf-unix/d;" ) >> pyproject.toml.m4 && git rm -f setup.cfg.m4)

(the conversion of the m4 files loses some install-requires and needs to be fixed up manually.)

This is also preparation for #34630 (migration from setuptools to meson-python)

Depends on #33842
Depends on #30666

CC: @mkoeppe

Component: build

Author: Matthias Koeppe

Branch/Commit: u/mkoeppe/migrate_from_setup_cfg_to_pyproject_toml @ f81a0c8

Issue created by migration from https://trac.sagemath.org/ticket/33577

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions