1

pyproject.toml (from PEP 518) is for "the build system requirements".

The setup_requires argument of setuptools.setup() is for "other distributions required for the setup script to run".

I'm having a hard time understanding what the practical difference between these is (if any)?

cowlinator
  • 7,195
  • 6
  • 41
  • 61
  • 2
    Does this answer your question? [What is pyproject.toml file for?](https://stackoverflow.com/questions/62983756/what-is-pyproject-toml-file-for) – Michael Wheeler Oct 08 '21 at 05:55
  • 1
    Think that you need to import a dependency in `setup.py` — you cannot install it using `setup_requires` because `setup()` is called after the import and the import would fail. `pyproject.toml` is interpreted before `setup.cfg`/`setup.py` so it can install build time dependencies that will be imported in `setup.py`. – phd Oct 08 '21 at 10:57
  • Yes, thank you phd, that answers my question – cowlinator Oct 08 '21 at 20:34

0 Answers0