pypa / build

A simple, correct Python build frontend
https://build.pypa.io
MIT License
735 stars 120 forks source link

I would appreciate a less verbose build option #772

Open BMaxV opened 5 months ago

BMaxV commented 5 months ago

Hello everyone,

The default

python -m build

lists a lot of interactions with files that I don't want to see (600 lines). I really only want to know if the build succeeded or not.

can I have a

python -m build --quiet

or something that just tells me Successfully built foobar.whl? I can just pipe it to a file but that doesn't tell me success y/n.

Thank you for your work and this software!

abravalheri commented 5 months ago

If you are using setuptools as backend, you can try:

python -m build -C--quiet

To reduce de verbosity (it will not reduce to 1 line though).

henryiii commented 5 months ago

Build does not interfere with the build backend's output. That's why build backends like scikit-build-core produce colorful output with build, and not with pip (which captures and reprints the output). Build backends generally have verbosity toggles. Setuptools is the only one that is extremely verbose by default.

That said, it might not be a bad idea, I'm +0.1 on it. You can do && echo "Success" || echo "Failed", I think.

henryiii commented 5 months ago

I'd like some way to communicate to tools what the built distributions were, but that's tricky to do since stdout/stderr are being written to by the build backend. uv does this by writing to a file, that might be what we have to do. Might be related.

layday commented 5 months ago

I'd like some way to communicate to tools what the built distributions were, but that's tricky to do since stdout/stderr are being written to by the build backend. uv does this by writing to a file, that might be what we have to do. Might be related.

This is https://github.com/pypa/build/issues/198 - let's discuss it there.