install: Migrate from setup.py to pyproject.toml.
- I use Hatch instead of Setuptools because Setuptools data-files doesn't support recursive file includes.
Fixes: N/A
How did you test this PR?
- Running
pytest tests - Running my own script to automate uploading a file to a given topic in a channel
- Ensured that the target data files, share/zulip has the same content as when installed in current main
- [ ] Self-reviewed the changes for clarity and maintainability (variable names, code reuse, readability, etc.).
Communicate decisions, questions, and potential concerns.
- [ ] Explains differences from previous plans (e.g., issue description).
- [ ] Highlights technical choices and bugs encountered.
- [ ] Calls out remaining decisions and concerns.
- [ ] Automated tests verify logic where appropriate.
Individual commits are ready for review (see commit discipline).
- [ ] Each commit is a coherent idea.
- [ ] Commit message(s) explain reasoning and motivation for changes.
Completed manual review and testing of the following:
- [ ] Visual appearance of the changes.
- [ ] Responsiveness and internationalization.
- [ ] Strings and tooltips.
- [ ] End-to-end functionality of buttons, interactions and flows.
- [ ] Corner cases, error conditions, and easily imagined bugs.
Did you consider uv instead of Setuptools or Hatch?
You only migrated zulip, but we publish zulip-bots and zulip-botserver in sync with zulip, so we should migrate all three packages at once, perhaps using uv workspaces (it looks like Hatch is still missing an equivalent feature: pypa/hatch#233).
I wasn't aware of uv_build when I created this PR. According to https://github.com/astral-sh/uv/issues/3957, the issue itself was closed on July 3 2025. I suppose as of today it makes more sense to use uv_build instead.
I just tried uv_build and found that it doesn't support dynamic version field: https://github.com/astral-sh/uv/issues/11718.