[Distutils] Recursive package data

Phillip J. Eby pje at telecommunity.com
Thu Sep 29 01:23:38 CEST 2005


At 01:25 PM 9/28/2005 -0700, Ben Bangert wrote:
>As I'm looking at setuptools to handle distribution and usage of web
>application's, being able to package arbitrarily deep static content
>that belongs with the webapp package (of various extension types)
>starts cropping up. Having no way to just say, "everything under this
>dir is package data, keep it" becomes a real killer in this context.
>
>I think I heard somewhere that this feature is being discussed/ 
>implemented, when will it be available? (or is it not being developed?)

I originally thought I could just slap in detection via revision control 
metadata, but it turned out to be problematic.  Doing "sdist" this way is 
not a problem, because the generated sdist doesn't need to know how its 
contents were generated - you don't generally build another sdist from an 
sdist.  But doing this for data files would mean the information used to 
generate the list would be lost to source distributions, which would be 
Very Bad, because you then couldn't generate a bdist_egg from an sdist.

So, the current status is that I'm a bit stumped as to how to implement the 
feature sanely, and was hoping for some type of brainstorm that would make 
it easier.  :)

Really, I suppose one way to do it would be to just include *everything* in 
package directories (minus CVS/.svn subdirs or other specialized 
exclusions), but this quickly seems to be duplicating the MANIFEST and 
MANIFEST.in mechanism of the distutils.

In short, for right now I recommend simply writing your own routine(s) to 
generate file lists or a package_data dictionary, and I'd be interested in 
seeing different approaches and trying to get some kind of synthesis 
together in setuptools, assuming I don't come up with a clean way to unify 
the manifest stuff with this.



More information about the Distutils-SIG mailing list