Mercurial > hg > PaInt
comparison paint/info.py @ 56:042a1b2a3e8a
start flushing out tests
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Wed, 23 Jan 2013 16:01:29 -0800 |
parents | a8236b97abd3 |
children | d5e5c7496784 |
comparison
equal
deleted
inserted
replaced
55:72e521851f1a | 56:042a1b2a3e8a |
---|---|
28 def __call__(self): | 28 def __call__(self): |
29 setuptools = sys.modules.get('setuptools') | 29 setuptools = sys.modules.get('setuptools') |
30 sys.modules['setuptools'] = sys.modules[__name__] | 30 sys.modules['setuptools'] = sys.modules[__name__] |
31 globals()['setup'] = self._setup | 31 globals()['setup'] = self._setup |
32 try: | 32 try: |
33 | 33 module = imp.load_source('setup', setup_py) |
34 finally: | |
35 sys.modules.pop('setuptools') | |
36 if setuptools: | |
37 sys.modules['setuptools'] = setuptools | |
38 globals().pop('setup') | |
34 return self.__dict__.pop('_info') | 39 return self.__dict__.pop('_info') |
35 | 40 |
36 def _setup(self, **kwargs): | 41 def _setup(self, **kwargs): |
37 self._info = kwargs | 42 self._info = kwargs |