Re: [Distutils] Recursive package data
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.
Phillip J. Eby wrote:
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.
Isn't that information in MANIFEST? Couldn't every package that gets installed have every file under it that is also in MANIFEST be considered a package_data file? Is there stuff people distribute that shouldn't be installed? I guess tests might count (I personally have come to prefer keeping them outside of the packages, so it's not a problem). -- Ian Bicking / ianb@colorstudy.com / http://blog.ianbicking.org
participants (2)
-
Ian Bicking
-
Phillip J. Eby