Why not auto-delete "src/PACKAGE_NAME.egg-info/" and "build/" #4197
-
Hi, I'm a newbie to building python projects. I've read the setuptools User Guide. I'd like to know why not auto-delete the artifacts.
an answer reads:
however another upvoted answer right there says:
My observations and questions:Assuming the src-layout:
Please help me clear things up:Why are these files created? - what's their purpose, if I can safely delete them? Can / should I? It would be great if these topics are also covered in the excellent User guide! Or is the only way to NOT create them - use another build backend (instead of |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
It's likely because it contains structured metadata that may be useful for other tools somebody may use in tandem. Also, editable installs are based on linking the project from Regardless of whether you delete this metadata, you shouldn't commit it into Git. So a common practice is to exclude it via |
Beta Was this translation helpful? Give feedback.
I think it's better to open an issue or a pull request for cleaning this up. It's likely just a historical artifact nobody thought of addressing.
That's out of the setuptools' control. See https://www.hyrumslaw.com. Though, it doesn't mean that setuptools recommends relying on this.