Hi, I'm trying to use setuptools auto-script feature with standalone scripts and am having problems.
Say I have a script "mypkg/scripts/foo.py":
---------------------
import sys
print "Hello foo! My args are:",
sys.argv
---------------------
When I try wrapping it like this:
'console_scripts': [
'foo = mypkg.scripts.foo',
]
Then run like this:
$ foo aa bb cc
It appears to start OK (and it gets the cmdline args) but crashes with a traceback:
------------
Hello foo! My args are: ['c:\\frank\\py25\\Scripts\\foo-script.py', 'aa', 'bb', 'cc']
Traceback (most recent call last):
File "c:\frank\py25\Scripts\foo-script.py", line 8, in <module>
load_entry_point('mypkg==0.99.50-rc1', 'console_scripts', 'foo')()
TypeError: 'module' object is not callable
------------
Am I setting up 'console_scripts' incorrectly, or is this kind of usage not supported?
thanks,
Frank