squashed
squashed

Reputation: 303

Controlling build directories for python wheel building

Is there a canonical way to ensure no build files (temporary or otherwise) are written to the project area when I build?

When I do a python -m build --wheel for example, I see a build and dist directory with various build artifacts.

I tackled this issue a while back and it involved writing custom bdist_wheel, egg_info, and build commands in setup.py (and then overriding the initialize_options) but I have tried this method and my redirects are being ignored.

It seems like these days the build system is calling build_meta backend which is building in the project area without checking the options.

I know I can pass --outdir to the build command but my build process requires a directory to be generated on the fly so I can't use this unless I write a build script and bypass setup.py and build entirely.

What is the modern way to handle this?

Upvotes: 0

Views: 33

Answers (0)

Related Questions