Skip to content

local imports to setup.py alias with PYTHONPATH when run from ../pep517/in_process/_in_process.py #373

Open
@mccullerlp

Description

@mccullerlp

I am using a helper module "setup_helper.py" to add some consistency checking to my setup.py build process. The setup_helper.py is in the same folder as setup.py and is imported correctly when using "python setup.py".

When using python -m build, I find that another package that I have that is on my PYTHONPATH with its own setup_helper.py in the sys.path is getting imported and called rather than the local one. I've tried adding back "." to the sys.path and haven't yet found a workaround. I've found that this is happening when sys.argv[0] or __main__.__file__ point to this _in_process.py runner.
`
It's a subtle and unexpected error to have the import path handling change with this build system. I don't understand why this is happening to help it though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions