add optional compiling for python