How to use buildout with a scripts directory?

J

Jon

Hello,

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:

..\eggs\imaged11-1.2.3-py2.5-win32.egg\EGG-INFO\scripts\peaksearch.py

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:

setup.py:
....
setup(name='ImageD11',
...,
packages = ["ImageD11"],
package_dir = {"ImageD11":"ImageD11"},
scripts = [ "scripts/peaksearch.py",
"scripts/bgmaker.py",
...]
)



c:\testImageD11distutils\> python setup.py install
....
Installing peaksearch.py script to c:\python25\Scripts
Installing bgmaker.py 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:
==================
[buildout]
parts = ImageD11

[ImageD11]
recipe = zc.recipe.egg:scripts
scripts = scripts/peaksearch.py
eggs = ImageD11
version = 1.2.3


It seems to acknowledge that scripts/peaksearch.py 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 http://pypi.python.org/pypi/zc.buildout
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!

Jon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top