pypa/build

fine-tuning the build process

stefanseefeld opened this issue · 4 comments

I'm trying to figure out how to customize the build process using the build tool. I'm used to defining custom commands with setup.py, but I haven't quite figured out how to do the equivalent with build. Even if I use setuptools as backend, it isn't quite clear how I would instruct build to use those additional build steps. (I'm mainly trying to inject additional files into the generated packages.)

@stefanseefeld for custom additional build steps when using setuptools you can try something like this.

This will work if you intend for the custom build steps to be automatically called during the build.

Thanks, that's very helpful. Is there a way to build anything other than wheels with this frontend ? I ultimately need to re-package my code into a debian / ubuntu package. So if I can't do this directly with the build module, I'd need at least to get hold of the intermediate build directory so I can post-process that with dpkg or somesuch.

 Is there a way to build anything other than wheels with this frontend ?

No, Iam afraid. It is Python-specific... Just wheels and sdists.

So if I can't do this directly with the build module, I'd need at least to get hold of the intermediate build directory so I can post-process that with dpkg or somesuch.

The docs list all the public interfaces (CLI and API) of this project.

Othen than that, you would can always unzip the wheel or use something like installer.

Fair enough. Thanks !