Skip to content

Commit

Permalink
removed microstructpy install from sphinx conf
Browse files Browse the repository at this point in the history
  • Loading branch information
kip-hart committed Jun 25, 2020
1 parent ae35a44 commit 8a67ad4
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,18 @@

import sphinx_gallery

import microstructpy

def read(*fname):
return open(os.path.join(os.path.dirname(__file__), *fname)).read()


def find_version(*fname):
ver_str = ''
for line in read(*fname).split('\n'):
if line.startswith('__version__') and '=' in line:
ver_str = line.split('=')[-1].strip().strip('\"').strip('\'')
break
return ver_str


# -- Project information -----------------------------------------------------
Expand All @@ -28,10 +39,11 @@
copyright = '2020, Georgia Tech Research Corporation'
author = 'Kenneth Hart'

# The short X.Y version
version = ''.join(microstructpy.__version__.split('.')[:2])
# The full version, including alpha/beta/rc tags
release = microstructpy.__version__
release = find_version('..', '..', 'src', 'microstructpy', '__init__.py')

# The short X.Y version
version = ''.join(release.split('.')[:2])


# -- General configuration ---------------------------------------------------
Expand Down

0 comments on commit 8a67ad4

Please sign in to comment.