First of all, Thrift is not well documented. Since it is a low level transport that was built for larger projects, it makes some sense that the writers of Thrift really care more about the larger project, but, for us people trying to use Thrift in a new project, a bunch more documentation would be a help. Others have started to fill the gap (like Diwaker’s Thrift: The Missing Guide) but there is still a big barrier to getting started.
As of today (August 3, 2016) the latest Thrift sources require TwistedTrial to be
installed to build the Python libraries. The documentation does not mention this and it
is frustrating in that no error is generated – Python is just not built even with
--with-python configuration parameter. Since TwistedTrial
is only needed to run the test suite, I edited
remove that requirement. And viola, Python libraries built and installed.
The change is:
builder@sys:~/thrift-git$ git diff configure.ac diff --git a/configure.ac b/configure.ac index c72dd43..bcdaec3 100755 --- a/configure.ac +++ b/configure.ac @@ -281,8 +281,9 @@ AM_PATH_PYTHON(2.6,, :) AX_THRIFT_LIB(python, [Python], yes) if test "$with_python" = "yes"; then AC_PATH_PROG([PIP], [pip]) - AC_PATH_PROG([TRIAL], [trial]) - if test -n "$TRIAL" && test "x$PYTHON" != "x" && test "x$PYTHON" != "x:" ; then + if test "x$PYTHON" != "x" && test "x$PYTHON" != "x:" ; then have_python="yes" fi fi builder@sys:~/thrift-git$
More notes are most likely on the way as I write Python code to use Thrift.