How to use buildout with a scripts directory?

Jon jonathan.wright at
Mon Feb 9 18:36:48 CET 2009


I am trying to use buildout and am having trouble to figure out how to
get it to install the scripts that come with a package. They are
present inside the egg which is installed by buildout, but they don't
end up in the bin directory. After running buildout my bin directory
is empty, but I can find:


In the package I have a directory (ImageD11) with the library stuff in
it and a directory named "scripts" with the scripts. When I use
distutils or setuptools it does what I expected:
      packages = ["ImageD11"],
      package_dir = {"ImageD11":"ImageD11"},
     scripts = [ "scripts/",

c:\testImageD11distutils\> python install
Installing script to c:\python25\Scripts
Installing script to c:\python25\Scripts

Now I am wondering how to persuade "buildout" to do the same thing,
but place those scripts into it's own little area.

In buildout.cfg I have:
parts = ImageD11

recipe = zc.recipe.egg:scripts
scripts = scripts/
eggs = ImageD11
version = 1.2.3

It seems to acknowledge that scripts/ is requested, but
doesn't seem to do anything about it. My scripts mostly just map
command line arguments to function calls, something like this:

if __name__=="__main__":
    import ImageD11.something, sys
    ImageD11.something.do_something_interesting( sys.argv[1], sys.argv
[2] )

I've read the documentation at
several times but I still can't figure out how to make these scripts
part of the build. There seems to be a lot of talk about entry_points,
but I'm blocked on those as to what is the entry point for an if
__name__=="__main__": idiom?

Thanks in advance for any help!


More information about the Python-list mailing list