Skip to content

Commit

Permalink
- different way to get at the package version
Browse files Browse the repository at this point in the history
  • Loading branch information
dataflake committed Jun 10, 2018
1 parent 8e12af8 commit 14832ba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
16 changes: 6 additions & 10 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,23 @@
#
import datetime
import os
import pkginfo
import pkg_resources
import sys
# sys.path.insert(0, os.path.abspath('.'))
import Products
Products.__path__.append(os.path.abspath('../Products'))
sys.path.append(os.path.abspath('../'))
rqmt = pkg_resources.require('Products.ZMySQLDA')[0]


# -- Project information -----------------------------------------------------
parent = os.path.dirname(os.path.dirname(__file__))
parent_dir = os.path.abspath(parent)
sys.path.append(parent_dir)
pkg_info = pkginfo.Develop(parent_dir)
year = datetime.datetime.now().year
project = pkg_info.name
project = 'Products.ZMySQLDA'
copyright = '2001-%s, Zope Foundation and Contributors' % year
author = 'Zope Foundation and Contributors'

# The short X.Y version
version = pkg_info.version.replace('dev', '')
version = '%s.%s' % tuple(map(int, rqmt.version.split('.')[:2]))
# The full version, including alpha/beta/rc tags
release = pkg_info.version
release = rqmt.version


# -- General configuration ---------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion rtd.txt
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
pkginfo

0 comments on commit 14832ba

Please sign in to comment.