Skip to content

Commit

Permalink
Merge pull request #62 from sblisesivdin/sblisesivdin-patch-__version__
Browse files Browse the repository at this point in the history
Insert __version__ information
  • Loading branch information
jochym authored May 6, 2023
2 parents 8daae37 + c8722d0 commit 6117c9a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions elastic/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,15 @@
from .elastic import get_BM_EOS, get_elastic_tensor
from .elastic import get_elementary_deformations, scan_volumes
from .elastic import get_pressure, get_strain, BMEOS

# To reach "elastic.__version__" attribute in other programs
from setuptools_scm import get_version
ver = get_version().split('+')[0].split('.')

if ver[-1].startswith('dev'):
ver[-1] = ver[-1][3:]
ver[-2] = str(int(ver[-2])-1)

ver = '.'.join(ver)

__version__ = ver

0 comments on commit 6117c9a

Please sign in to comment.