1
0

Compare commits

..

No commits in common. "6369804b3fff39e911288e7ab537848d1092833d" and "ff4a975c796def38b1abf34120d4a937ca473584" have entirely different histories.

2 changed files with 4 additions and 3 deletions

View File

@ -1 +1 @@
__version__ = '0.1.51' __version__ = '0.1.50'

View File

@ -30,14 +30,15 @@ Defined hierarchy:
PACKAGE_DESCRIPTION_SHORT = """ PACKAGE_DESCRIPTION_SHORT = """
Python library defining base types for financial processing.""".strip() Python library defining base types for financial processing.""".strip()
def parse_version_file(text: str) -> str: def parse_version_file(text: str) -> str:
text = re.sub('^#.*', '', text, flags=re.MULTILINE) match = re.match(r'^__version__\s*=\s*(["\'])([\d\.]+)\1$', text)
match = re.match(r'^\s*__version__\s*=\s*(["\'])([\d\.]+)\1$', text)
if match is None: if match is None:
msg = 'Malformed _version.py file!' msg = 'Malformed _version.py file!'
raise Exception(msg) raise Exception(msg)
return match.group(2) return match.group(2)
with open(PACKAGE_NAME + '/_version.py') as f: with open(PACKAGE_NAME + '/_version.py') as f:
version = parse_version_file(f.read()) version = parse_version_file(f.read())