-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modernize build system to be based on pyproject.toml #1334
Comments
I like the idea of moving to something like either hatch or uv and getting rid of nox for running our tests in multiple python environments. I tried moving to a more modern Python project setup where everything is in On a semi-related note, I'd already replaced the mix of |
#1336 handles the moving to |
#1343 Moved the |
#1344 Moves the |
#1345 Moves |
I'm going to resolve this and create a new issue for considering moving to hatch or uv |
I created #1366 to encompass the future work for moving to something like |
We need to replace the legacy build system based on
setup.py
,setup.cfg
with a modern Python one based onpyproject.toml
. This guide on How to modernize a setup.py based project has some useful pointers on where to start.setup.cfg
should be deleted entirely and all configuration moved topyproject.toml
. Anypython setup.py
commands need to be migrated to a modernpython -m build
orpython -m pip install
command.There are several more advanced build system tools which are worth exploring. The current default recommendation from python seems to be hatch. It has impressive features including declaring build/test configurations and managing venv environments. @anselor tried
hatch
on a couple small projects and found it to be much faster than using nox to set up venvs. The problem is it currently doesn't support a monorepo project with multiple modules or plugin modules. There is a development ticket (pypa/hatch#233) that documents it and it is under active development now. Once that is complete we should be able to migrate tohatch
with minimal fuss.A newer alternative that is taking the Python world by storm is uv which is an extremely fast Python package and project manager, written in Rust.
uv
is a single tool to replacepip
,pip-tools
,pipx
,poetry
,pyenv
,virtualenv
,pipenv
and more. I've used this at work to replacepip
in some builds and it has typically sped things up by a factor of 2x.The text was updated successfully, but these errors were encountered: