Better reading of path to metadata.py file in setup.py

This commit is contained in:
Niru Maheswaranathan
2017-05-25 12:42:48 -07:00
parent 412e02b297
commit d7596f611f
3 changed files with 5 additions and 3 deletions

View File

@@ -49,7 +49,7 @@ Hosted at Read The Docs: [tableprint.readthedocs.org](http://tableprint.readthed
- `six` - `six`
## Version ## Version
- 0.6.6 (May 25 2017) Fixes some bugs with ANSI escape sequences - 0.6.7 (May 25 2017) Fixes some bugs with ANSI escape sequences
- 0.5.0 (Sept 29 2016) Better handling of ANSI escape sequences in table rows - 0.5.0 (Sept 29 2016) Better handling of ANSI escape sequences in table rows
- 0.4.0 (May 3 2016) Adds a 'block' style - 0.4.0 (May 3 2016) Adds a 'block' style
- 0.3.2 (May 3 2016) Adds a test suite - 0.3.2 (May 3 2016) Adds a test suite

View File

@@ -1,6 +1,6 @@
# Version info # Version info
__name__ = 'tableprint' __name__ = 'tableprint'
__version__ = '0.6.6' __version__ = '0.6.7'
__license__ = 'MIT' __license__ = 'MIT'
# Project description(s) # Project description(s)

View File

@@ -1,8 +1,10 @@
import re import re
import os
from setuptools import setup from setuptools import setup
with open('metadata.py', 'r') as f: __location__ = os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__)))
with open(os.path.join(__location__, 'metadata.py'), 'r') as f:
metadata = dict(re.findall("__([a-z_]+)__\s*=\s*'([^']+)'", f.read())) metadata = dict(re.findall("__([a-z_]+)__\s*=\s*'([^']+)'", f.read()))