changeset 105:67b50417b8d1

stub out loading api templates; this wont work, however, since one is in the middle of a module trying to load a module that depends on the module you are in
author Jeff Hammel <jhammel@mozilla.com>
date Tue, 11 Jan 2011 19:23:53 -0800
parents e059a58ea23c
children 1295df1700a4
files makeitso/makeitso.py setup.py
diffstat 2 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/makeitso/makeitso.py	Tue Jan 11 19:13:34 2011 -0800
+++ b/makeitso/makeitso.py	Tue Jan 11 19:23:53 2011 -0800
@@ -17,6 +17,16 @@
 from ConfigParser import RawConfigParser
 from optparse import OptionParser
 
+# get templates from pkg_resources
+# (MakeItSo! and [TODO] pastescript templates)
+makeitso_templates = {}
+try:
+    from pkg_resources import iter_entry_points
+    for i in iter_entry_points('makeitso.templates'):
+        pass # :(
+except ImportError:
+    pass
+
 # URL of -this file-
 location = 'http://k0s.org/mozilla/hg/MakeItSo/raw-file/tip/makeitso/makeitso.py'
 
--- a/setup.py	Tue Jan 11 19:13:34 2011 -0800
+++ b/setup.py	Tue Jan 11 19:23:53 2011 -0800
@@ -32,5 +32,8 @@
       [console_scripts]
       makeitso = makeitso.makeitso:main
       make-python-package = makeitso.python:main
+
+      [makeitso.templates]
+      python-package = makeitso.python:PythonPackageTemplate
       """,
       )