
Hi, I would like to write a PEP about folder structure in python projects. You will think that there is no need for that, because everything is documented (package, module, setuptools). But it should contain something like [0]. If you aren't into those concepts, never have pushed some package to pypi, and you only have written some scripts, it's hard to find out how to structure your folders. Therefore i think a PEP would be a great way to show how you can do it. What do you think about it? [0] http://jcalderone.livejournal.com/39794.html

I think one of the goodnesses of Python is "no project structure", that make Python is easy to learn and easy to use. Could you show something like your Python project structure for example? I'm curious for why do you think Python needs a basic project structure : ) Just personally hate the project structure, because Erlang has project structure for each project, that made me get into a mess often.
About.me: http://about.me/littleq On Wednesday, May 30, 2012 at 4:45 PM, Armin Wieser wrote:

On Wed, May 30, 2012 at 10:45:31AM +0200, Armin Wieser wrote:
Hi,
I would like to write a PEP about folder structure in python projects.
Why? PEP stands for Python Enhancement Proposal, and relate to suggested changes to the Python language and standard library. Your blog post about folder structure:
is interesting, but it has nothing to do with either Python the language or the standard library, as far as I can tell. In fact, some of your project suggestions go against best-practice, or at least common practice: "Don't put your source in a directory called src" Really? I think you'll find many people disagree with that. I think your blog post is a good blog post, and deserves to have people read it and discuss it. With feedback from others, I think it might even become a good How To layout projects. But I think it would be a poor PEP. Of course, you can write a post in the format of a PEP. Just don't call it a PEP unless it is a proposal for an enhancement to Python, or at least related to development of Python, e.g. PEP 8. -- Steven

Steven D'Aprano wrote:
We do have informational PEPs for the purpose Armin is describing, but we usually only try to use those for standardization of things. I don't think a standard project dir layout is really needed. Helping new package authors finding the right structure for their project does help, though. Perhaps the idea could be turned into a section of the (distutils) documentation, a how-to or a page on the wiki ?! -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 30 2012)
2012-07-17: Python Meeting Duesseldorf ... 48 days to go 2012-07-02: EuroPython 2012, Florence, Italy ... 33 days to go 2012-05-16: Released eGenix pyOpenSSL 0.13 ... http://egenix.com/go29 ::: Try our new mxODBC.Connect Python Database Interface for free ! :::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/

On Wed, May 30, 2012 at 9:01 PM, M.-A. Lemburg <mal@egenix.com> wrote:
The basic problem is that it's a matter of "it depends what you're building and whether or not there are any other constraints on your layout". Kenneth Reitz has a decent guide that he posted recently ([1]), but see the comments below the post for some useful caveats and discussion. Ultimately though, providing a place to provide opinionated advice on exactly this kind of question is why the Hitchhiker's Guide to Python [2] was created. [1] http://kennethreitz.com/repository-structure-and-python.html [2] http://docs.python-guide.org/en/latest/index.html -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia

I think one of the goodnesses of Python is "no project structure", that make Python is easy to learn and easy to use. Could you show something like your Python project structure for example? I'm curious for why do you think Python needs a basic project structure : ) Just personally hate the project structure, because Erlang has project structure for each project, that made me get into a mess often.
About.me: http://about.me/littleq On Wednesday, May 30, 2012 at 4:45 PM, Armin Wieser wrote:

On Wed, May 30, 2012 at 10:45:31AM +0200, Armin Wieser wrote:
Hi,
I would like to write a PEP about folder structure in python projects.
Why? PEP stands for Python Enhancement Proposal, and relate to suggested changes to the Python language and standard library. Your blog post about folder structure:
is interesting, but it has nothing to do with either Python the language or the standard library, as far as I can tell. In fact, some of your project suggestions go against best-practice, or at least common practice: "Don't put your source in a directory called src" Really? I think you'll find many people disagree with that. I think your blog post is a good blog post, and deserves to have people read it and discuss it. With feedback from others, I think it might even become a good How To layout projects. But I think it would be a poor PEP. Of course, you can write a post in the format of a PEP. Just don't call it a PEP unless it is a proposal for an enhancement to Python, or at least related to development of Python, e.g. PEP 8. -- Steven

Steven D'Aprano wrote:
We do have informational PEPs for the purpose Armin is describing, but we usually only try to use those for standardization of things. I don't think a standard project dir layout is really needed. Helping new package authors finding the right structure for their project does help, though. Perhaps the idea could be turned into a section of the (distutils) documentation, a how-to or a page on the wiki ?! -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, May 30 2012)
2012-07-17: Python Meeting Duesseldorf ... 48 days to go 2012-07-02: EuroPython 2012, Florence, Italy ... 33 days to go 2012-05-16: Released eGenix pyOpenSSL 0.13 ... http://egenix.com/go29 ::: Try our new mxODBC.Connect Python Database Interface for free ! :::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/

On Wed, May 30, 2012 at 9:01 PM, M.-A. Lemburg <mal@egenix.com> wrote:
The basic problem is that it's a matter of "it depends what you're building and whether or not there are any other constraints on your layout". Kenneth Reitz has a decent guide that he posted recently ([1]), but see the comments below the post for some useful caveats and discussion. Ultimately though, providing a place to provide opinionated advice on exactly this kind of question is why the Hitchhiker's Guide to Python [2] was created. [1] http://kennethreitz.com/repository-structure-and-python.html [2] http://docs.python-guide.org/en/latest/index.html -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia
participants (5)
-
Armin Wieser
-
LittleQ
-
M.-A. Lemburg
-
Nick Coghlan
-
Steven D'Aprano