5 ms·
Yeah, I adopted the “src” dir layout after reading this post some time back: https://blog.ionelmc.ro/2014/05/25/python-packaging/#the-structure https://blog.io
by dannyboland 4y ago
Yeah, I adopted the “src” dir layout after reading this post some time back:
https://blog.ionelmc.ro/2014/05/25/python-packaging/#the-structure https://blog.ionelmc.ro/2014/05/25/python-packaging/#the-str...
It describes some of the outdated motivations for the other layouts commonly seen with python, as well as the many benefits of the “src” layout.
- bvrmn 4y agoPost doesn't make sense. It clearly states that you only be sure that package is working by actually installing it into clean virtualenv and testing it there. `src` or any other layout doesn't matter.
- iggy_knights 4y agoThe difference is if you're running tests from your root project directory, the package is importable regardless of whether or not it is installed, as python picks up packages in the current working directory by name. src/ prevents this.
- bvrmn 4y agoBut it doesn't prevent package configuration errors and allows to bdist broken package. What's the point then?