mirror of
https://github.com/KevinMidboe/tableprint.git
synced 2025-10-29 09:50:17 +00:00
Better reading of path to metadata.py file in setup.py
This commit is contained in:
4
setup.py
4
setup.py
@@ -1,8 +1,10 @@
|
||||
import re
|
||||
import os
|
||||
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()))
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user