# HG changeset patch # User Jeff Hammel # Date 1310147028 25200 # Node ID 57834c2b0937101df36c3cfca405b7e1be91fe89 # Parent 0107f95376b364a19fcde0c61d7f4ee4e02e3b37 add a single-file module to the thingy diff -r 0107f95376b3 -r 57834c2b0937 makeitso/python_module/setup.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/makeitso/python_module/setup.py Fri Jul 08 10:43:48 2011 -0700 @@ -0,0 +1,34 @@ +import os +from setuptools import setup + +try: + here = os.path.dirname(os.path.abspath(__file__)) + description = file(os.path.join(here, 'README.txt')).read() +except IOError: + description = None + +version = '0.0' + +deps = [] + +setup(name='{{module}}', + version=version, + description="{{description}}", + long_description=description, + classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers + keywords='mozilla', + author='{{author}}', + author_email='{{email}}', + url='{{url}}', + license='', + py_modules=['{{module}}'], + packages=[], + include_package_data=True, + zip_safe=False, + install_requires=deps, + entry_points=""" + # -*- Entry points: -*- + [console_scripts] + {{module}} = {{module}}:main + """, + ) diff -r 0107f95376b3 -r 57834c2b0937 makeitso/python_module/{{module}}.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/makeitso/python_module/{{module}}.py Fri Jul 08 10:43:48 2011 -0700 @@ -0,0 +1,18 @@ +#!/usr/bin/env python + +""" +{{module}} +""" + +import sys +from optparse import OptionParser + +def main(args=sys.argv[1:]): + + # parse command line arguments + usage = '%prog [options] ...' + parser = OptionParser(usage=usage, description=__doc__) + options, args = parser.parse_args(args) + +if __name__ == '__main__': + main()