build icon indicating copy to clipboard operation
build copied to clipboard

[feature] Add sub command or flag to overwrite directory dist

Open zhongjiajie opened this issue 3 years ago • 4 comments

For now, we can could python package by running the command python -m build. and both tar.gz and whl files would be created and location it to directory dist. but when I change versions of the package and re-run the command python -m build, the old package still exists.

could we add a flag --overwirte, -o to build, if user add this and we would clean the distribute dir first before we output our build result

zhongjiajie avatar Feb 22 '22 03:02 zhongjiajie

-o (--outdir) flag already exists.

93578237 avatar Mar 03 '22 04:03 93578237

@q0w It is not about specific the output directory, it is overwrite the exists the output dir

zhongjiajie avatar Mar 03 '22 04:03 zhongjiajie

I mean -o flag is used, it should be something else.

93578237 avatar Mar 03 '22 04:03 93578237

yeah, you're right

zhongjiajie avatar Mar 03 '22 05:03 zhongjiajie

We can use -ow for --overwrite, but I am a little bit confused if the default dir is dist then it can clean it but if the user has changed the outdir, then do we need to add an optional argument for it or we can manually run a checker to check the build dir and then clean it.

cc. @zhongjiajie @layday

Mr-Sunglasses avatar Sep 02 '23 18:09 Mr-Sunglasses

I want to keep the flag as explicit as possible. Instead of --overwrite it should be --delete-outdir-before-build (no short form) 👍

gaborbernat avatar Sep 06 '23 15:09 gaborbernat

We can use -ow for --overwrite, but I am a little bit confused if the default dir is dist then it can clean it but if the user has changed the outdir, then do we need to add an optional argument for it or we can manually run a checker to check the build dir and then clean it.

cc. @zhongjiajie @layday

I think we should delete the user custom dir if they config it

zhongjiajie avatar Oct 07 '23 08:10 zhongjiajie

@layday to avoid any further confusion, it might be best to close this issue for now.

Mr-Sunglasses avatar Feb 22 '24 08:02 Mr-Sunglasses

We couldn't agree that this is desirable, closing for now.

layday avatar Feb 22 '24 17:02 layday