Make setup importable.

Only run it if it is the main script.  The versiondata from setup.py
can thus be imported from sphinx conf.py.
Add missing import.