NF: add pip and easy install testing

Some refactoring of the pre_cmds also to make them more flexible.