[Distutils] Help to create a setup.py (subdirectories aren't working)
martin.raspaud at smhi.se
Thu Mar 25 13:33:31 CET 2010
-----BEGIN PGP SIGNED MESSAGE-----
Tarek Ziadé skrev:
>> One question though: where should I place configuration files for the package,
>> and how to handle this in setup.py ?
> There's no good way to do it, the way we handle these files in
> distutils is inefficient,
> but we are working on this for distutils2.
> Today what you can do (that's what I do but maybe others have a better
> way to handle this):
> It depends if you are targeting all platforms or just linux. For all
> platforms, I would put it *inside* the package
> so I can get it back using the __file__ variable, no matter if the
> package is installed or in development.
> That doesn't work with setuptools or distribute and zipped eggs, but
> setuptools has some APIs to do it (so you can get
> the resource file from the zip) -- I expect PJE to give you more
> details on this if he sees the mail.
> For linux-only, I install it in /etc, via data_file
> (see http://docs.python.org/distutils/setupscript.html#installing-additional-files),
> then I look for the file in the code in
> that place, with a local fallback.
Thanks, I think I will go for the local version. It seems to be what setuptools
> btw, you can probably add an issue here for the guide about it:
> so we can add a section in the guide about this issue.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 259 bytes
Desc: not available
More information about the Distutils-SIG