[Distutils] including an empty directory

Domen Kožar iElectric at gmail.com
Wed Jan 28 16:23:12 CET 2009


nice post zooko, thanks.

On Jan 25, 4:54 pm, zooko <zo... at zooko.com> wrote:
> On Jan 25, 2009, at 3:05 AM, Tarek Ziadé wrote:
>
> > Well if that's a recurrent need maybe we can add this feature.
>
> > What about a new option called "include_empty_folders" (False by  
> > default)
>
> In a related story, I recently found a problem with the packaging of  
> nevow.  We had earlier added "twisted.plugins" to "packages", not  
> because nevow includes a package named "twisted.plugins", but because  
> that's the only way we could figure out how to make sure that  
> distutils and/or setuptools would create the empty "twisted/plugins"  
> directory on installation which nevow requires:
>
> http://divmod.org/trac/changeset/16896
>
> However, this leads to this warning message at import time:
>
> "/usr/lib/python2.5/site-packages/zope/__init__.py:19: UserWarning:  
> Module twisted was already imported from /usr/lib/python2.5/site-
> packages/twisted/__init__.pyc, but /home/buildslave/slave-gutsy-tahoe/
> gutsy/build/support/lib/python2.5/site-packages/Nevow-0.9.32-
> py2.5.egg is being added to sys.path"
>
> http://bugs.python.org/setuptools/issue36
>
> So I've just submitted a patch to nevow to use data_files instead of  
> packages to indicate that this directory should be created, and to do  
> that we have to include a file in the directory so that distutils  
> doesn't prune it out for being an empty directory:
>
> http://divmod.org/trac/ticket/2830
>
> One thing that I don't understand about all this is why setuptools's  
> "include_package_data=True" didn't cause the directory to be  
> installed.  I'm not sure if calling that "twisted/plugins" directory  
> a "data file" or an "included package data" makes more sense, but the  
> former currently works.
>
> Regards,
>
> Zooko
> ---
> Tahoe, the Least-Authority Filesystem --http://allmydata.org
> store your data: $10/month --http://allmydata.com/?tracking=zsig
> _______________________________________________
> Distutils-SIG maillist  -  Distutils-... at python.orghttp://mail.python.org/mailman/listinfo/distutils-sig


More information about the Distutils-SIG mailing list