Compare commits
4 Commits
ff4a975c79
...
6369804b3f
Author | SHA1 | Date | |
---|---|---|---|
6369804b3f | |||
00abe85282 | |||
055a1a302e | |||
7c76ece99a |
|
@ -1 +1 @@
|
||||||
__version__ = '0.1.50'
|
__version__ = '0.1.51'
|
||||||
|
|
5
setup.py
5
setup.py
|
@ -30,15 +30,14 @@ 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:
|
||||||
match = re.match(r'^__version__\s*=\s*(["\'])([\d\.]+)\1$', text)
|
text = re.sub('^#.*', '', text, flags=re.MULTILINE)
|
||||||
|
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())
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user