python-zulip-api icon indicating copy to clipboard operation
python-zulip-api copied to clipboard

install: Migrate from setup.py to pyproject.toml.

Open rht opened this issue 5 months ago • 3 comments

  • 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.

rht avatar Jul 26 '25 15:07 rht

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).

andersk avatar Sep 30 '25 19:09 andersk

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.

rht avatar Oct 01 '25 19:10 rht

I just tried uv_build and found that it doesn't support dynamic version field: https://github.com/astral-sh/uv/issues/11718.

rht avatar Oct 02 '25 15:10 rht