Skip to content

build: migrate from setup.py to pyproject.toml#601

Draft
ormsbee wants to merge 1 commit into
openedx:mainfrom
ormsbee:convert-to-pyproject
Draft

build: migrate from setup.py to pyproject.toml#601
ormsbee wants to merge 1 commit into
openedx:mainfrom
ormsbee:convert-to-pyproject

Conversation

@ormsbee
Copy link
Copy Markdown
Contributor

@ormsbee ormsbee commented Jun 6, 2026

Replace the legacy setup.py + setup.cfg + MANIFEST.in (base.in) packaging
with a declarative pyproject.toml using the setuptools build backend
(PEP 517/621/639).

  • pyproject.toml is now the sole source of truth for runtime dependencies;
    requirements/base.in is removed and pip-compile reads pyproject.toml
    (-c requirements/constraints.txt) to generate base.txt.
  • Dynamic version via [tool.setuptools.dynamic] attr = openedx_core.version.
  • Keep include-package-data + MANIFEST.in so py.typed/.pyi stubs/data files
    continue to ship in the wheel.
  • Migrate [isort] config into [tool.isort]; drop obsolete [wheel] universal=1
    and the setup.py "tag" git shortcut (releases trigger on tag push).
  • tox.ini: drop setup.py from lint targets; replace
    setup.py check --restructuredtext with readme_renderer.
  • pypi-publish.yml: build with python -m build instead of
    setup.py sdist bdist_wheel.
  • Regenerate base.txt annotations (no version pins changed).

Verified: python -m build, twine check, wheel ships py.typed/stubs/data,
Requires-Dist intact, editable (PEP 660) install imports openedx_core 1.0.1,
pip-compile resolves the identical dependency set.

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

Replace the legacy setup.py + setup.cfg + MANIFEST.in (base.in) packaging
with a declarative pyproject.toml using the setuptools build backend
(PEP 517/621/639).

- pyproject.toml is now the sole source of truth for runtime dependencies;
  requirements/base.in is removed and pip-compile reads pyproject.toml
  (-c requirements/constraints.txt) to generate base.txt.
- Dynamic version via [tool.setuptools.dynamic] attr = openedx_core.__version__.
- Keep include-package-data + MANIFEST.in so py.typed/.pyi stubs/data files
  continue to ship in the wheel.
- Migrate [isort] config into [tool.isort]; drop obsolete [wheel] universal=1
  and the setup.py "tag" git shortcut (releases trigger on tag push).
- tox.ini: drop setup.py from lint targets; replace
  `setup.py check --restructuredtext` with `readme_renderer`.
- pypi-publish.yml: build with `python -m build` instead of
  `setup.py sdist bdist_wheel`.
- Regenerate base.txt annotations (no version pins changed).

Verified: python -m build, twine check, wheel ships py.typed/stubs/data,
Requires-Dist intact, editable (PEP 660) install imports openedx_core 1.0.1,
pip-compile resolves the identical dependency set.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

1 participant