change the output location
This commit is contained in:
4
setup.py
4
setup.py
@@ -11,7 +11,7 @@ from distutils.command.build_py import build_py_2to3 as _build_py
|
|||||||
# @brief Creates Protobuf python files to encode and decode messages
|
# @brief Creates Protobuf python files to encode and decode messages
|
||||||
# @param[in] source The protobuf source file
|
# @param[in] source The protobuf source file
|
||||||
def generateProtobuf(source):
|
def generateProtobuf(source):
|
||||||
output = source.replace('.proto', '_pb2.py').replace('src/protobuf/', '')
|
output = source.replace('.proto', '_pb2.py').replace('src/protobuf/', 'aman/com/')
|
||||||
|
|
||||||
if (not os.path.exists(output) or (os.path.exists(source) and os.path.getmtime(source) > os.path.getmtime(output))):
|
if (not os.path.exists(output) or (os.path.exists(source) and os.path.getmtime(source) > os.path.getmtime(output))):
|
||||||
print('Generating %s...' % output)
|
print('Generating %s...' % output)
|
||||||
@@ -24,7 +24,7 @@ def generateProtobuf(source):
|
|||||||
sys.stderr.write('Cannot find proto-compiler')
|
sys.stderr.write('Cannot find proto-compiler')
|
||||||
sys.exit(-1)
|
sys.exit(-1)
|
||||||
|
|
||||||
command = [ 'external/bin/protoc.exe', '-Isrc/protobuf/', '-I.', '--python_out=.', source]
|
command = [ 'external/bin/protoc.exe', '-Isrc/protobuf/', '-I.', '--python_out=aman/com/', source]
|
||||||
if 0 != subprocess.call(command):
|
if 0 != subprocess.call(command):
|
||||||
sys.exit(-1)
|
sys.exit(-1)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user