[Checkins] SVN: zope.event/branches/tseaver-new_style_docs/docs/conf.py Tie docs versions to setup.py verion.

Tres Seaver tseaver at palladion.com
Tue Apr 20 14:58:16 EDT 2010


Log message for revision 111181:
  Tie docs versions to setup.py verion.

Changed:
  U   zope.event/branches/tseaver-new_style_docs/docs/conf.py

-=-
Modified: zope.event/branches/tseaver-new_style_docs/docs/conf.py
===================================================================
--- zope.event/branches/tseaver-new_style_docs/docs/conf.py	2010-04-20 18:37:02 UTC (rev 111180)
+++ zope.event/branches/tseaver-new_style_docs/docs/conf.py	2010-04-20 18:58:16 UTC (rev 111181)
@@ -11,13 +11,14 @@
 # All configuration values have a default; values that are commented out
 # serve to show the default.
 
-import sys, os
+import sys, os, pkg_resources
 
 # 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
 # documentation root, use os.path.abspath to make it absolute, like shown here.
 #sys.path.append(os.path.abspath('.'))
 sys.path.append(os.path.abspath('../src'))
+rqmt = pkg_resources.require('zope.event')[0]
 
 # -- General configuration -----------------------------------------------------
 
@@ -51,9 +52,9 @@
 # built documents.
 #
 # The short X.Y version.
-version = '3.4'
+version = '%s.%s' % tuple(map(int, rqmt.version.split('.')[:2]))
 # The full version, including alpha/beta/rc tags.
-release = '3.4.2'
+release = rqmt.version
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.



More information about the checkins mailing list