[Distutils] Re: [Twisted-Python] including plugins.tml in a package

Fred L. Drake, Jr. fdrake at acm.org
Tue Aug 17 02:13:49 CEST 2004


On Monday 16 August 2004 02:00 pm, Abe Fettig wrote:
 > OK, I've come up with a hack that seems to accomplish putting data files
 > in with python files in bdist_wininst.  This is a hack, folks - I'm not
 > a distutils expert, and I'm really hoping someone is going to chime in
 > with a better way.

Things are better in Python 2.4.  ;-)  You'll be able to spell out a set of 
files that should be installed into your package directly in setup.py.  For 
instance, if you're distributing the pakcage "pkg" and it includes a file 
"plugins.html" that should be in the package directory, you can use:

setup(packages=["pkg"],
      package_data={"pkg": ["pkg/plugins.html"]},
      ...)

If you want to do this without waiting for Python 2.4, you can use Phillip 
Eby's setuptools package.  This can be found in the Python CVS tree at 
nondist/sandbox/setuptools/.  Very cool.


  -Fred

-- 
Fred L. Drake, Jr.  <fdrake at acm.org>



More information about the Distutils-SIG mailing list