Commits

Owen Nelson committed d89927b

pulling trawler version strings for docs

  • Participants
  • Parent commits 08014fa

Comments (0)

Files changed (2)

File docs/conf.py

 # serve to show the default.
 
 import sys, os
+ROOT = os.path.abspath(os.path.dirname(__file__))
+SRC = os.path.join(ROOT, 'src')
+sys.path.insert(0, SRC)
+import trawler
 
 # If extensions (or modules to document with autodoc) are in another directory,
 # add these directories to sys.path here. If the directory is relative to the
 # built documents.
 #
 # The short X.Y version.
-version = '0.1'
+version = trawler.__shortversion__
 # The full version, including alpha/beta/rc tags.
-release = '0.1a'
+release = trawler.__version__
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.

File src/trawler/__init__.py

 import os, subprocess
 
+__shortversion__ = '0.1'
 __version__ = '0.1a'
 __dev__ = True
 
     try:
         pipe = subprocess.Popen(
             ["hg", "id", "-i", os.path.join(
-                os.path.abspath(os.path.dirname(__file__)), 
+                os.path.abspath(os.path.dirname(__file__)),
                 '../../')], # FIXME
             stdout=subprocess.PIPE
             )
         return 'unknown'
 
 if __dev__:
-     __version__ += '.hg-'+get_hg_rev()
+     __version__ += '.hg-' + get_hg_rev()