예제 #1
0
 def __init__(self, configuration, distribution, interpretor=None):
     self.path = configuration.get_cfg_directory()
     self.configuration = configuration
     self.distribution = distribution
     if interpretor is None:
         interpretor = PythonInterpreter.detect(
             configuration['setup']['python_executable'].as_text())
     self.interpretor = interpretor
예제 #2
0
 def __call__(self, distribution, path, interpreter):
     setup_py = os.path.join(path, 'setup.py')
     if os.path.isfile(setup_py):
         interpretor = PythonInterpreter.detect()
         # XXX Review this
         source, _, code = interpretor.execute_module(
             unsetuptoolize, '-d', path)
         if not code:
             if source:
                 return InterpretedSetuptoolsLoader(path, source)
         logger.debug(u"Missing setuptools configuration in  %s, " % path)
     return None
예제 #3
0
 def __init__(self, options, status):
     super(PythonCompileFile, self).__init__(options, status)
     self.interpreter = PythonInterpreter.detect(
         options.get_with_default(
             'python_executable', 'setup').as_text())
     self._do = MultiTask(options, 'compile')
예제 #4
0
 def __init__(self, interpretor=None, no_defaults=False, no_activate=True):
     self.interpretor = PythonInterpreter.detect(
         interpretor , not no_activate)
     self.clear(no_defaults)
예제 #5
0
 def __init__(self, options, status):
     super(PythonCommand, self).__init__(options, status)
     self.commands = options.get('python_commands', '').as_list()
     self.interpreter = PythonInterpreter.detect(
         options.get_with_default(
             'python_executable', 'setup').as_text())