Skip to content

Migrate fully to pyproject.toml (rebased #1324) #1586

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

neiljp
Copy link
Collaborator

@neiljp neiljp commented May 19, 2025

What does this PR do, and why?

Outstanding aspect(s)

  • [ ]

External discussion & connections

  • Discussed in #zulip-terminal in topic
  • Fully fixes #
  • Partially fixes issue #
  • Builds upon previous unmerged work in PR #
  • Is a follow-up to work in PR #
  • Requires merge of PR #
  • Merge will enable work on #

How did you test this?

  • Manually - Behavioral changes
  • Manually - Visual changes
  • Adapting existing automated tests
  • Adding automated tests for new behavior (or missing tests)
  • Existing automated tests should already cover this (only a refactor of tested code)

Self-review checklist for each commit

  • It is a minimal coherent idea
  • It has a commit summary following the documented style (title & body)
  • It has a commit summary describing the motivation and reasoning for the change
  • It individually passes linting and tests
  • It contains test additions for any new behavior
  • It flows clearly from a previous branch commit, and/or prepares for the next commit

Visual changes

@neiljp neiljp added the area: infrastructure Project infrastructure label May 19, 2025
@zulipbot zulipbot added the size: XL [Automatic label added by zulipbot] label May 19, 2025
@neiljp neiljp force-pushed the 2025-05-18-pyproject-bump branch from 87dfdb7 to a6b39da Compare May 19, 2025 07:22
Previously setup.py specifically excluded tests from being packaged, but
recent testing demonstrated this now included other files, including
development tools.

Moving to use the `include` option for the source is simpler here,
combined with the addition of a MANIFEST.in file.

The MANIFEST.in file is used by various tools, and appears more reliable
than other methods to achieve this, particularly as we move towards
using pyproject.toml.

For now, this aims to remove all but the absolute minimum files to run.

MANIFEST added to .gitlint to allow presence as an area in commit
titles.
@neiljp neiljp force-pushed the 2025-05-18-pyproject-bump branch 4 times, most recently from fb29542 to b85978a Compare May 19, 2025 22:11
This transfers details from setup.py to equivalent ones in pyproject.toml,
and similarly removes or substitutes references to these files. The
previous setup.py file is removed.

Note: This introduces 3 other changes from the previous state:
* Building packages no longer removes the top title line shown on GitHub
* The `zip_safe` property is detected automatically by `setuptools`
* The types-setuptools package is included for type-checking

This also adds a note to the making-a-new-release doc, since while it was
previously out of date, setup.py will now be absent completely.
@neiljp neiljp force-pushed the 2025-05-18-pyproject-bump branch 3 times, most recently from fe6caf8 to 387190a Compare May 21, 2025 01:14
@neiljp neiljp force-pushed the 2025-05-18-pyproject-bump branch from 387190a to 86a2102 Compare May 21, 2025 01:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: infrastructure Project infrastructure size: XL [Automatic label added by zulipbot]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants