Use a "src" directory?
jab opened this issue · 5 comments
I recently saw the rationale for using a "src" directory described in http://andrewsforge.com/article/python-new-package-landscape/ and was curious what you think.
this is another good reference https://blog.ionelmc.ro/2014/05/25/python-packaging/#the-structure
Use of src
or not is 100% personal preference. It doesn't really matter. For example, neither Flask, Zappa, Django, Requests, Responses, Responders, etc use the src
approach. It's a legacy of another time, nothing more.
Thank you for your consideration, but I'm closing this as a wontimplement
.
I agree that it is a personal preference. But to say it "doesn't matter" and "legacy of another time, nothing more", is a curt reply to the question. There is a rational for the src-layout as discussed in several blog articles. Even pytest has a use case where they recommend it, https://docs.pytest.org/en/latest/goodpractices.html. Also, there is a long thread in PyPUG issue #320 on this topic. @jab was asking for your opinion, I guess he got it.
My apologies if i came across as being curt. There are better ways forme to express my opinion. I'll try to explain myself better in a comment I'll write later today..
@pydanny, hope you're doing well. Just hit this issue again. Re your comment citing Flask as a counterexample, @davidism moved several of the Pallets projects (Flask, Jinja, Click, Werkzeug, etc.) to using a src
directory a while ago. Not sure if you had time to read any of the links cited above, but they actually provide technical justifications for doing this, rather than it being 100% personal preference or nothing more than a legacy of another time. When I opened this issue, I was genuinely curious if you had any technical counterarguments to the rationale presented above, and I still am, in case you're interested to dig into this a little more. Thanks :)