Chore!: Switch from setup.py to pyproject.toml#3953
Merged
Conversation
4913dcb to
4067eeb
Compare
izeigerman
reviewed
Mar 7, 2025
| "ruamel.yaml", | ||
| "sqlglot[rs]~=26.8.0", | ||
| "tenacity", | ||
| "time-machine", |
Contributor
There was a problem hiding this comment.
Shouldn't this be a dev dependency?
Contributor
There was a problem hiding this comment.
It's used in the testing module: https://github.com/TobikoData/sqlmesh/blob/e100fbf126761a86004fd50d235798e64977c562/sqlmesh/core/test/definition.py#L678-L680
izeigerman
approved these changes
Mar 7, 2025
62ef0f3 to
7ea1e6b
Compare
Merged
afzaljasani
pushed a commit
that referenced
this pull request
Apr 8, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pip installhas been warning us for months about things like: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.tomland removed thesetup.pyconfig.The packages can now be built with
python -m buildand 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-testsbecause it was running the parent sqlmeshsetup.pyin order to extract dependencies. I changed it to use thetomllibrary to load the sqlmeshpyproject.tomland just grab the dependencies that way.Note that I havent moved any of the mypy config from
setup.cfgand into pyproject.toml, I was just focusing on packaging.