[Python-Dev] Status of packaging in 3.3 (original) (raw)

Chris McDonough chrism at plope.com
Thu Jun 21 18:02:55 CEST 2012


On 06/21/2012 11:45 AM, PJ Eby wrote:

On Jun 21, 2012 10:12 AM, "Chris McDonough" <chrism at plope.com_ _<mailto:chrism at plope.com>> wrote: > - Install "package resources", which are non-Python source files that > happen to live in package directories. I love this phrasing, by the way ("non-Python source files"). A pet peeve of mine is the insistence by some people that such files are "data" and don't belong in package directories, despite the fact that if you gave them a .py extension and added data="""...""" around them, they'd be considered part of the code. A file's name and internal format aren't what distinguishes code from data; it's the way it's used that matters. I think "packaging" has swung the wrong way on this particular point, and that resources and data files should be distinguished in setup.cfg, with sysadmins not being given the option to muck about with resources -- especially not to install them in locations where they might be mistaken for something editable.

+1. A good number of the "package resource" files we deploy are not data files at all. In particular, a lot of them are files which represent HTML templates. These templates are exclusively the domain of the software being installed, and considering them explicitly "more editable" than the Python source they sit next to in the package structure is a grave mistake. They have exactly the same editability candidacy as the Python source files they are mixed in with.



More information about the Python-Dev mailing list