[Distutils] Using an egg like a Java jar file - Part 2

mhearne808 mhearne808 at gmail.com
Tue Jul 28 23:43:03 CEST 2009


I apologize for posting out of my thread, but I tried to "reply" twice
to my original thread, and my message didn't seem to appear anywhere.
Maybe it's just delayed...  Anyway, here goes:

All: This may be a duplicate post - I can't see the post I just
submitted, so I'm trying again.

Thanks for the suggestions.  I can't use 2.6 because it isn't
installed on the systems where my script will be running.

I'm attempting to use the 'eggsecutable' suggestion.  How do I get
command line parameters passed into my entry point main() function?

Code is appended below.
setup.py:
from setuptools import setup, find_packages

setup(name='testme',
      version='1.0.0',
      py_modules=['testme'],
      description = 'foo',
      author = 'Somebody',
      author_email = 'somebody at foo.com',
      url = 'www.foo.com',
      entry_points = {
        'setuptools.installation': ['eggsecutable = testme:main',]}
      )

testme.py:
#!/usr/bin/env python
import sys

def main(input):
    print 'Command line arguments are ' % input

if __name__ == '__main__':
    main(sys.argv)


More information about the Distutils-SIG mailing list