Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dec5ab3036 | ||
|
|
e5391245d4 |
No files matched your search
@@ -39,6 +39,7 @@
|
||||
|
||||
<Message Importance="High" Text="Generating service %(Proto3.FileName)" />
|
||||
<Exec Command="
|
||||
set PATH=$(spark_build_python_path);%path% &
|
||||
set PYTHONPATH=$(Externals)\python &
|
||||
$(protoc) ^
|
||||
%(Proto3.FullPath) ^
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/python
|
||||
from __future__ import print_function
|
||||
import os, sys
|
||||
from collections import namedtuple
|
||||
|
||||
@@ -30,8 +31,8 @@ import apioptions_pb2
|
||||
def loadTemplate(lang, name):
|
||||
path = os.path.join("templates", lang, name)
|
||||
text = open(path).read()
|
||||
utext = unicode(text, "utf-8")
|
||||
return compiler.compile(utext)
|
||||
#utext = unicode(text, "utf-8")
|
||||
return compiler.compile(text)
|
||||
|
||||
def option(options, key, default=None):
|
||||
if options.HasExtension(key):
|
||||
@@ -307,7 +308,7 @@ if __name__ == "__main__":
|
||||
if DEBUG:
|
||||
data = open("data", mode='rb').read()
|
||||
else:
|
||||
data = sys.stdin.read()
|
||||
data = sys.stdin.buffer.read()
|
||||
request = plugin.CodeGeneratorRequest()
|
||||
# open("data", 'wb').write(data)
|
||||
request.ParseFromString(data)
|
||||
@@ -316,8 +317,8 @@ if __name__ == "__main__":
|
||||
|
||||
if DEBUG:
|
||||
for f in response.file:
|
||||
print f.content
|
||||
print(f.content)
|
||||
else:
|
||||
output = response.SerializeToString()
|
||||
sys.stdout.write(output)
|
||||
sys.stdout.buffer.write(output)
|
||||
|
||||
@@ -2,4 +2,6 @@
|
||||
setlocal
|
||||
@call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\Tools\VsDevCmd.bat" > nul
|
||||
cd /d %~dp0/../
|
||||
setlocal
|
||||
set path=%spark_build_python_path%;%path%
|
||||
msbuild /m /nologo /p:debugtype=portable /p:platform=x64 /p:GenerateFullPaths=true /clp:verbosity=minimal /clp:summary %* spark_client.sln
|
||||
+1
-2
@@ -4,5 +4,4 @@ cd %~dp0\..
|
||||
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\Tools\VsDevCmd.bat" > nul
|
||||
cd /d %~dp0\..
|
||||
setlocal
|
||||
set path=c:\python27;%path%
|
||||
cmd /C start "" "C:\Program Files\Microsoft VS Code\Code.exe" "%*" -n
|
||||
cmd /C start "" "C:\Program Files\Microsoft VS Code\Code.exe" "%*"
|
||||
Reference in new issue
Block a user