diff --git a/setup.py b/setup.py index cac092170d2f73d37d656cf7e94031e81e8716c4..31e99f7b940640d6b354ac1de8103109587ec6ec 100644 --- a/setup.py +++ b/setup.py @@ -13,6 +13,14 @@ import distutils.command.build # TODO: replace the tasks that call binary_c-config with a single function that handles the return status a bit better. +def version(): + """ + opens VERSION and returns version number + """ + + with open("VERSION") as file: + return file.read().strip() + # Functions def readme(): """Opens readme file and returns content""" @@ -224,7 +232,7 @@ class CustomBuildCommand(distutils.command.build.build): setup( name="binarycpython", - version="0.9.1", + version=version(), description="""This is a python API for binary_c (versions {}) by David Hendriks, Rob Izzard and collaborators. Based on the initial set up by Jeff andrews.""".format( ",".join(REQUIRED_BINARY_C_VERSIONS), ",".join(REQUIRED_BINARY_C_VERSIONS),