Fix py3k module importing; stick a bunch of macros in one place.