make sure required python libs are built when building a module's python lib

close #367