Skip to content

Chore!: Switch from setup.py to pyproject.toml#3953

Merged
erindru merged 3 commits intomainfrom
erin/switch-to-pyproject-toml
Mar 10, 2025
Merged

Chore!: Switch from setup.py to pyproject.toml#3953
erindru merged 3 commits intomainfrom
erin/switch-to-pyproject-toml

Conversation

@erindru
Copy link
Collaborator

@erindru erindru commented Mar 6, 2025

pip install has been warning us for months about things like:

DEPRECATION: Legacy editable install of sqlmesh is deprecated. pip 25.1 will enforce this behaviour change. A possible replacement is to add a pyproject.toml

It's only a matter of time before this causes major problems at an inopportune moment, so to head it off i've added a pyproject.toml and removed the setup.py config.

The packages can now be built with python -m build and the build occurs in an isolated environment. I verified that the resulting wheel and sdist contained the same contents as the direct setuptools version, in particular that the wheel only contained the compiled UI assets and not the UI source code (which makes it ~5mb instead of ~10mb).

I also ported sqlmesh-tests because it was running the parent sqlmesh setup.py in order to extract dependencies. I changed it to use the toml library to load the sqlmesh pyproject.toml and just grab the dependencies that way.

Note that I havent moved any of the mypy config from setup.cfg and into pyproject.toml, I was just focusing on packaging.

@erindru erindru changed the title Chore: Switch from setup.py to pyproject.toml Chore!: Switch from setup.py to pyproject.toml Mar 6, 2025
@erindru erindru force-pushed the erin/switch-to-pyproject-toml branch from 4913dcb to 4067eeb Compare March 7, 2025 01:35
"ruamel.yaml",
"sqlglot[rs]~=26.8.0",
"tenacity",
"time-machine",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be a dev dependency?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@erindru erindru force-pushed the erin/switch-to-pyproject-toml branch from 62ef0f3 to 7ea1e6b Compare March 10, 2025 19:25
@erindru erindru merged commit 173a4c0 into main Mar 10, 2025
22 checks passed
@erindru erindru deleted the erin/switch-to-pyproject-toml branch March 10, 2025 20:11
@mattseddon mattseddon mentioned this pull request Mar 27, 2025
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.

3 participants