diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -1,5 +1,7 @@
 from distutils.core import setup
 
+version = '1.0.2'
+
 # If sphinx is installed, enable the command
 try:
     from sphinx.setup_command import BuildDoc
@@ -14,8 +16,6 @@ except ImportError:
     cmdclass = {}
     command_options = {}
 
-version = '1.0.2'
-
 setup(name='simplemediawiki',
       version=version,
       description='Extremely low-level wrapper to the MediaWiki API',
Make sphinx building actually work