smarted base path discovery and better python 3 integration