Exemplo n.º 1
0
 def execute(self):
   print "Build operating on target: %s" % self.target
   executor = PythonChroot(self.target, self.root_dir)
   launcher = PythonLauncher(executor.dump().path())
   binary = None
   if isinstance(self.target, PythonBinary):
     binary = executor.path()
   launcher.run(binary=binary, args=list(self.args))
Exemplo n.º 2
0
 def execute(self):
   print "Build operating on target: %s" % self.target
   executor = PythonChroot(self.target, self.root_dir)
   executor.dump()
   binary = None
   if isinstance(self.target, PythonBinary):
     binary = os.path.join(executor.path(), '__main__.py')
   launcher = Launcher(executor.path(), binary)
   launcher.run(args=list(self.args))
Exemplo n.º 3
0
 def execute(self):
   print("Build operating on target: %s %s" % (self.target,
     'Extra targets: %s' % ' '.join(map(str, self.extra_targets)) if self.extra_targets else ''))
   executor = PythonChroot(self.target, self.root_dir, extra_targets=self.extra_targets)
   if self.options.pex:
     # TODO(wickman)  This overlaps with commands/build.py and should be factored out, perhaps
     # in pants.new.
     pex_name = os.path.join(self.root_dir, 'dist', '%s.pex' % self.target.name)
     PexBuilder(executor.dump()).write(pex_name)
     print('Wrote %s' % pex_name)
   else:
     launcher = PythonLauncher(executor.dump().path())
     binary = None
     if isinstance(self.target, PythonBinary):
       binary = executor.path()
     launcher.run(binary=binary, args=list(self.args))
Exemplo n.º 4
0
 def execute(self):
     print "Build operating on target: %s" % self.target
     executor = PythonChroot(self.target, self.root_dir)
     executor.dump()
     binary = None
     if isinstance(self.target, PythonBinary):
         binary = os.path.join(executor.path(), '__main__.py')
     launcher = Launcher(executor.path(), binary)
     launcher.run(args=list(self.args))