towards python3 shared source compatible