Skip to content

Commit

Permalink
Version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
mmcauliffe committed Aug 17, 2021
1 parent 8775c6f commit c4eb2c2
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
2 changes: 1 addition & 1 deletion polyglotdb/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
__ver_major__ = 1
__ver_minor__ = 1
__ver_patch__ = 1
__ver_patch__ = 2
__ver_tuple__ = (__ver_major__, __ver_minor__, __ver_patch__)
__version__ = "%d.%d.%d" % __ver_tuple__

Expand Down
22 changes: 21 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,30 @@ def run_tests(self):
errcode = pytest.main(self.test_args)
sys.exit(errcode)

def read(rel_path):
here = os.path.abspath(os.path.dirname(__file__))
with codecs.open(os.path.join(here, rel_path), 'r') as fp:
return fp.read()


def get_version(rel_path):
delim = ' = '
for line in read(rel_path).splitlines():
if line.startswith('__ver_major__'):
major_version = line.split(delim)[1]
elif line.startswith('__ver_minor__'):
minor_version = line.split(delim)[1]
elif line.startswith('__ver_patch__'):
patch_version = line.split(delim)[1].replace("'", '')
break
else:
raise RuntimeError("Unable to find version string.")
return "{}.{}.{}".format(major_version, minor_version, patch_version)


if __name__ == '__main__':
setup(name='polyglotdb',
version='1.1.0',
version=get_version("polyglotdb/__init__.py"),
description='',
long_description=readme(),
long_description_content_type='text/markdown',
Expand Down

0 comments on commit c4eb2c2

Please sign in to comment.