Skip to content

Commit

Permalink
Updated version handling
Browse files Browse the repository at this point in the history
  • Loading branch information
linucks committed Jul 20, 2020
1 parent ec53cec commit 7fd1146
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
6 changes: 3 additions & 3 deletions ambuild/ab_cell.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
@author: abbietrewin
"""
VERSION = "1.0.0"
import collections
import copy
import logging
Expand All @@ -26,6 +25,7 @@
from ambuild import ab_fragment
from ambuild import ab_subunit
from ambuild import ab_util
from ambuild.version import __version__
from ambuild import xyz_core
from ambuild import xyz_util

Expand Down Expand Up @@ -128,8 +128,8 @@ def __init__(
self.paramsDir = paramsDir
# Use the parameters to set the bond lengts in the util module
xyz_util.setModuleBondLength(os.path.join(paramsDir, "bond_params.csv"))
self.version = VERSION # Save as attribute so we can query pickle files
logger.info("AMBUILD version: {0}".format(VERSION))
self.version = __version__ # Save as attribute so we can query pickle files
logger.info("AMBUILD version: {0}".format(self.version))
self.setMdEngineCls(ab_util.HOOMDVERSION)
if filePath:
self.setStaticBlock(filePath)
Expand Down
2 changes: 2 additions & 0 deletions ambuild/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
__version_info__ = (1, 0, 0)
__version__ = ".".join(map(str, __version_info__))
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import setuptools
from ambuild.version import __version__

with open("README.md", "r") as fh:
long_description = fh.read()

setuptools.setup(
name="ambuild",
version="1.0.0",
version=__version__,
author="Jens Thomas",
author_email="[email protected]",
description="A program for creating polymeric molecular structures.",
Expand Down

0 comments on commit 7fd1146

Please sign in to comment.