Move from setup.py to uv+pyproject.toml #496
Open
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.
Description
I ran this by @nicknisi, but this is an upgrade to the plumbing behind our package building a testing to use UV instead of
setup.py."Why?" I hear you asking; ultimately a few reasons.
setup.pyfile and direct invocation, but all direct invocations ofsetup.pyhave been essentially deprecated for years, and since PEP 518/621 landed, it's preferred to move away from the file entirely towards non-code files (namely,pyproject.toml).src/layout (i.e. the python package is in thesrcdirectory instead of therootdirectory) and managing its installation withuvalso means we avoid some common and easy to hit bugs when it comes to catching import problems etc.There are other reasons I could probably elucidate, but I genuinely think this is a fairly uncontroversial change since a lot of the Python community is running to use UV as it stands.
Importantly, this does not change user workflows at all, with the minor exception of affecting those who were executing
python setup.py installdirectly previously (I'm unclear if there's a way to know that up front. We can bump the version and communicate this as a breaking change if so).Documentation
Does this require changes to the WorkOS Docs? E.g. the API Reference or code snippets need updates.
If yes, link a related docs PR and add a docs maintainer as a reviewer. Their approval is required.