From: David Reiss Date: Tue, 2 Dec 2008 02:11:13 +0000 (+0000) Subject: THRIFT-217. Use "--gen py" instead of "-py" in build scripts X-Git-Tag: 0.2.0~398 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=0c87ad41ee8dc669f8e1cbe0b17f8382844a0497;p=common%2Fthrift.git THRIFT-217. Use "--gen py" instead of "-py" in build scripts git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@722333 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/if/regen.sh b/if/regen.sh index ed25cc6a..02e9fa2f 100755 --- a/if/regen.sh +++ b/if/regen.sh @@ -1,6 +1,6 @@ #!/bin/sh cd "`dirname $0`" -../compiler/cpp/thrift -cpp -py reflection_limited.thrift +../compiler/cpp/thrift --gen cpp --gen py reflection_limited.thrift cp gen-cpp/reflection_limited_types.h ../lib/cpp/src/ cp gen-cpp/reflection_limited_types.cpp ../lib/cpp/src/ cp -r gen-py/thrift/reflection ../lib/py/src diff --git a/test/FastbinaryTest.py b/test/FastbinaryTest.py index b27612bc..04b3e44e 100755 --- a/test/FastbinaryTest.py +++ b/test/FastbinaryTest.py @@ -1,6 +1,6 @@ #!/usr/bin/env python r""" -thrift -py DebugProtoTest.thrift +thrift --gen py DebugProtoTest.thrift ./FastbinaryTest.py """ diff --git a/test/py/Makefile.am b/test/py/Makefile.am index 9155179a..252f586b 100644 --- a/test/py/Makefile.am +++ b/test/py/Makefile.am @@ -21,7 +21,7 @@ TESTS= $(py_unit_tests) gen-py/ThriftTest/__init__.py: ../ThriftTest.thrift - $(THRIFT) -py $< + $(THRIFT) --gen py $< clean-local: $(RM) -r gen-py diff --git a/test/py/explicit_module/runtest.sh b/test/py/explicit_module/runtest.sh index 86592108..a2b07d29 100755 --- a/test/py/explicit_module/runtest.sh +++ b/test/py/explicit_module/runtest.sh @@ -1,13 +1,13 @@ #!/bin/bash rm -rf gen-py -../../../compiler/cpp/thrift -py test1.thrift || exit 1 -../../../compiler/cpp/thrift -py test2.thrift || exit 1 +../../../compiler/cpp/thrift --gen py test1.thrift || exit 1 +../../../compiler/cpp/thrift --gen py test2.thrift || exit 1 PYTHONPATH=./gen-py python -c 'import foo.bar.baz' || exit 1 PYTHONPATH=./gen-py python -c 'import test2' || exit 1 PYTHONPATH=./gen-py python -c 'import test1' &>/dev/null && exit 1 # Should fail. cp -r gen-py simple -../../../compiler/cpp/thrift -r -py test2.thrift || exit 1 +../../../compiler/cpp/thrift -r --gen py test2.thrift || exit 1 PYTHONPATH=./gen-py python -c 'import test2' || exit 1 diff -ur simple gen-py > thediffs file thediffs | grep -s -q empty || exit 1 diff --git a/test/threads/Makefile b/test/threads/Makefile index 59eb4f26..fb133a06 100644 --- a/test/threads/Makefile +++ b/test/threads/Makefile @@ -37,7 +37,7 @@ CFL = $(CCFL) $(LFL) all: server client stubs: ThreadsTest.thrift - $(THRIFT) -cpp -py ThreadsTest.thrift + $(THRIFT) --gen cpp --gen py ThreadsTest.thrift server: stubs g++ -o ThreadsServer $(CFL) ThreadsServer.cpp ./gen-cpp/ThreadsTest.cpp ./gen-cpp/ThreadsTest_types.cpp