Mercurial > hg > MakeItSo
comparison makeitso/makeitso.py @ 106:1295df1700a4
move stubbing around...maybe last minute will work better? ::shrug::
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Tue, 11 Jan 2011 19:30:13 -0800 |
parents | 67b50417b8d1 |
children | 2142ad247eb6 |
comparison
equal
deleted
inserted
replaced
105:67b50417b8d1 | 106:1295df1700a4 |
---|---|
15 # TODO: may have to use urllib2.urlopen to get reasonable timeouts | 15 # TODO: may have to use urllib2.urlopen to get reasonable timeouts |
16 | 16 |
17 from ConfigParser import RawConfigParser | 17 from ConfigParser import RawConfigParser |
18 from optparse import OptionParser | 18 from optparse import OptionParser |
19 | 19 |
20 # get templates from pkg_resources | |
21 # (MakeItSo! and [TODO] pastescript templates) | |
22 makeitso_templates = {} | |
23 try: | |
24 from pkg_resources import iter_entry_points | |
25 for i in iter_entry_points('makeitso.templates'): | |
26 pass # :( | |
27 except ImportError: | |
28 pass | |
29 | 20 |
30 # URL of -this file- | 21 # URL of -this file- |
31 location = 'http://k0s.org/mozilla/hg/MakeItSo/raw-file/tip/makeitso/makeitso.py' | 22 location = 'http://k0s.org/mozilla/hg/MakeItSo/raw-file/tip/makeitso/makeitso.py' |
32 | 23 |
33 ### import tempita | 24 ### import tempita |
514 # cleanup | 505 # cleanup |
515 cleanup() | 506 cleanup() |
516 | 507 |
517 if __name__ == '__main__': | 508 if __name__ == '__main__': |
518 main() | 509 main() |
510 | |
511 | |
512 # get templates from pkg_resources | |
513 # (MakeItSo! and [TODO] pastescript templates) | |
514 # this should go last to ensure the module is wholly loaded | |
515 def get_entry_points(name): | |
516 try: | |
517 from pkg_resources import iter_entry_points | |
518 for i in iter_entry_points('makeitso.templates'): | |
519 pass # :( | |
520 | |
521 except ImportError: | |
522 return None |