cache thrift_file load

cache thrift_file load
since the `__version__` is here, we may import and use it in `setup.py`.