

Another advantage of setup.py is that we can compute some variables dynamically during the build time as it’s a Python file. The only thing that pyproject.toml cannot achieve for the moment is the installation in editable mode, where we must use setup.py. As per PEP 517, and as per one of the comments of this StackOverflow thread, in some rare cases, we might have a chicken and egg problem when using setup.py if it needs to import something from the package it’s building. Pyproject.toml is the new Python project metadata specification standard since PEP 621. Loading data files packaged by data_files.Loading data files packaged by package_data.


With parameter data_files for any files.With parameter package_data for files inside a package.Adding data files to Python package with setup.py
