PEP 517 mandates “all hooks are run with working directory set to the root of the source tree”. This is important for in-tree hooks since the cwd is relied on to find the PEP 517 modules.
This fails:
$ python -m build ./example-project -s -o .
ERROR Backend 'pep517' is not available
But this works:
$ cd example-project
$ python -m build -s -o .
$ ls *.tar.gz
my_package-2.tar.gz
PEP 517 mandates “all hooks are run with working directory set to the root of the source tree”. This is important for in-tree hooks since the cwd is relied on to find the PEP 517 modules.
This fails:
But this works: