Esempio n. 1
0
 def __init__(self, proto, protoc = None, plugin = None, toolkit = None):
   name = proto.name_relative.without_last_extension()
   dsts = drake.nodes(
     name.with_extension('pb.go'),
   )
   srcs = []
   if plugin is None:
     if toolkit is not None:
       if toolkit.os == 'windows':
         plugin = drake.node('%s/bin/%s/protoc-gen-go.exe' % (
           toolkit.path, toolkit.platform_str()))
       else:
         plugin = drake.node('%s/bin/protoc-gen-go' % toolkit.path)
       if not plugin.builder:
         drake.go.FetchPackage(
           url = 'github.com/golang/protobuf/protoc-gen-go',
           toolkit = toolkit,
           targets = [
             plugin,
           ],
         )
     elif os.environ.get('GOPATH'):
       plugin = drake.node('%s/bin/protoc-gen-go' % os.environ['GOPATH'])
     elif os.environ.get('GOROOT'):
       plugin = drake.node('%s/bin/protoc-gen-go' % os.environ['GOROOT'])
   self.__toolkit = toolkit
   super().__init__(proto, protoc = protoc, plugin = plugin, targets = dsts)
Esempio n. 2
0
 def __init__(self, proto, protoc=None, plugin=None, toolkit=None):
     name = proto.name_relative.without_last_extension()
     dsts = drake.nodes(name.with_extension('pb.go'), )
     srcs = []
     if plugin is None:
         if toolkit is not None:
             if toolkit.os == 'windows':
                 plugin = drake.node('%s/bin/%s/protoc-gen-go.exe' %
                                     (toolkit.path, toolkit.platform_str()))
             else:
                 plugin = drake.node('%s/bin/protoc-gen-go' % toolkit.path)
             if not plugin.builder:
                 drake.go.FetchPackage(
                     url='github.com/golang/protobuf/protoc-gen-go',
                     toolkit=toolkit,
                     targets=[
                         plugin,
                     ],
                 )
         elif os.environ.get('GOPATH'):
             plugin = drake.node('%s/bin/protoc-gen-go' %
                                 os.environ['GOPATH'])
         elif os.environ.get('GOROOT'):
             plugin = drake.node('%s/bin/protoc-gen-go' %
                                 os.environ['GOROOT'])
     self.__toolkit = toolkit
     super().__init__(proto, protoc=protoc, plugin=plugin, targets=dsts)
Esempio n. 3
0
 def __init__(self, proto, protoc=None, plugin=None):
     name = proto.name_relative.without_last_extension()
     dsts = drake.nodes(
         '{}_pb2.py'.format(name),
         '{}_pb2_grpc.py'.format(name),
     )
     if plugin is None:
         plugin = drake.node('/usr/local/bin/grpc_python_plugin')
     super().__init__(proto, protoc=protoc, plugin=plugin, targets=dsts)
Esempio n. 4
0
 def __init__(self, proto, protoc = None, plugin = None):
   name = proto.name_relative.without_last_extension()
   dsts = drake.nodes(
     '{}_pb2.py'.format(name),
     '{}_pb2_grpc.py'.format(name),
   )
   if plugin is None:
     plugin = drake.node('/usr/local/bin/grpc_python_plugin')
   super().__init__(proto, protoc = protoc, plugin = plugin, targets = dsts)
Esempio n. 5
0
 def __init__(self, proto, protoc=None, plugin=None):
     name = proto.name_relative
     dsts = drake.nodes(
         name.with_extension('pb.h'),
         name.with_extension('pb.cc'),
         name.with_extension('grpc.pb.h'),
         name.with_extension('grpc.pb.cc'),
     )
     if plugin is None:
         plugin = drake.node('/usr/local/bin/grpc_cpp_plugin')
     super().__init__(proto, protoc=protoc, plugin=plugin, targets=dsts)
Esempio n. 6
0
 def __init__(self, proto, protoc = None, plugin = None):
   name = proto.name_relative
   dsts = drake.nodes(
     name.with_extension('pb.h'),
     name.with_extension('pb.cc'),
     name.with_extension('grpc.pb.h'),
     name.with_extension('grpc.pb.cc'),
   )
   if plugin is None:
     plugin = drake.node('/usr/local/bin/grpc_cpp_plugin')
   super().__init__(proto, protoc = protoc, plugin = plugin, targets = dsts)
Esempio n. 7
0
 def libraries(self):
     return drake.nodes(*[
         self.__library_path / f for f in Assimp.EXPECTED[self.__version]
         ["libraries"][self.__platform]
     ])
Esempio n. 8
0
 def headers(self):
     return drake.nodes(*[
         self.__include_path / f
         for f in Assimp.EXPECTED[self.__version]["headers"]
     ])
Esempio n. 9
0
 def others(self):
     return drake.nodes(*[
         getattr(self, path) / f
         for path, f in Vulkan.EXPECTED[self.__version]["others"]
     ])
Esempio n. 10
0
 def sources(self):
   return drake.nodes(*[self.__source_path / f for f in imgui.EXPECTED[self.__version]["sources"]])