Skip to content

Command does not change the current directory to project root #68

@uranusjr

Description

@uranusjr

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions