예제 #1
0
파일: __init__.py 프로젝트: mefyl/drake
 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)
예제 #2
0
파일: __init__.py 프로젝트: xmonader/elle
 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)
예제 #3
0
파일: __init__.py 프로젝트: xmonader/elle
 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)
예제 #4
0
파일: __init__.py 프로젝트: mefyl/drake
 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)
예제 #5
0
파일: __init__.py 프로젝트: xmonader/elle
 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)
예제 #6
0
파일: __init__.py 프로젝트: mefyl/drake
 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)
예제 #7
0
파일: __init__.py 프로젝트: k0rm1d/engine
 def libraries(self):
     return drake.nodes(*[
         self.__library_path / f for f in Assimp.EXPECTED[self.__version]
         ["libraries"][self.__platform]
     ])
예제 #8
0
파일: __init__.py 프로젝트: k0rm1d/engine
 def headers(self):
     return drake.nodes(*[
         self.__include_path / f
         for f in Assimp.EXPECTED[self.__version]["headers"]
     ])
예제 #9
0
파일: __init__.py 프로젝트: k0rm1d/engine
 def others(self):
     return drake.nodes(*[
         getattr(self, path) / f
         for path, f in Vulkan.EXPECTED[self.__version]["others"]
     ])
예제 #10
0
파일: __init__.py 프로젝트: k0rm1d/engine
 def sources(self):
   return drake.nodes(*[self.__source_path / f for f in imgui.EXPECTED[self.__version]["sources"]])