"but I can't imagine that automated compilation of arbitrary Python libraries into JS+HTML is feasible, "
into HTML? no. into javascript? yes. that's exactly what pyjamas does, and it's also what skulpt is aiming for, and it's exactly what the pypy project aimed for, except they gave up.
the tricky bit is doing it _efficiently_. we decided that that was a bad decision to enforce onto people, so we decided to offer two options: -O and --strict. they do exactly what you'd expect.