Implement PEP-517/518 (pyproject.toml)
Please remove setuptools from install_requires in setup.py. When using tools that compile list of deployable packages setuptools will be inadvertantly included and when using well known tools like pip-tools to compile a requirements file with hashes it will inadvertantly issue a warning that including setuptools in the compiled requirements file is considered unsafe (chicken egg issue).
Thanks for raising this @whardier. You're right, that should not be part of setup.py.
Ideally we tackle this as a broader push to implement PEP-517/518 (i.e., pyproject.toml).
The dependency has been removed as of #4124, release 2.2.1. I'll leave this ticket open to track a full pyproject.toml implementation.
A first (WIP) attempt at the conversion to pyproject.toml can be found here:
https://github.com/spulec/moto/compare/master...bblommers:admin/pyprojecttoml?expand=1
This PR does not provide an editable installation (pip install -e .), and I haven't figured out how/if that can be done without having a shim setup.py.
Downsides of the toml approach that I've encountered so far:
- The dependencies are copy-pasted everywhere, with a lot of potential for them to go out of sync
- All services have to be listed manually (as opposed to programmatically providing the list) - with more potential for things to go out of sync
The upsides of this approach are.. that it's new and fancy? I guess?
I like the idea of PEP-517, but as it stands, I'm not sure the downsides are worth it for this project. If anyone has suggestions on how to improve the current implementation I'd love to hear them!
(Outstanding TODO's: I've changed the project name/version to test the release process, that will obviously have to be changed back if/when we merge)
Bert, you might find this useful: PEP 660 – Editable installs for pyproject.toml based builds: https://peps.python.org/pep-0660/
And the list of features for PIP v21.3: https://pip.pypa.io/en/stable/news/#id94
Doesn't solve the requirements issue, nor can you force people to update pip, but ...
Thanks for sharing @kbalk! Good to know there is some progress in this space.