diff --git a/meta.json b/meta.json new file mode 100644 index 0000000..f81c986 --- /dev/null +++ b/meta.json @@ -0,0 +1,9 @@ +{ + "title": "pydockenv", + "version": "0.5.0", + "author": "Lou Marvin Caraig", + "author_email": "loumarvincaraig@gmail.com", + "description": "Python Virtualenv Powered by Docker", + "project_url": "https://github.com/se7entyse7en/pydockenv", + "copyright": "Copyright 2020 Lou Marvin Caraig" +} diff --git a/setup.py b/setup.py index bd4b7f1..14bfc93 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,4 @@ -import re -from functools import partial +import json import setuptools from wheel.bdist_wheel import bdist_wheel as _bdist_wheel @@ -22,28 +21,12 @@ 'Topic :: Utilities', ] -with open('README.md', 'r') as fh: - long_description = fh.read() +with open('README.md', 'r') as fin: + long_description = fin.read() -def get_about(): - regexes = { - 'title': r"^__title__\s=\s(?P['])(?P\w*)(?P=quote)$", - 'version': r"^__version__\s=\s(?P<quote>['])(?P<version>[\w\.]*)(?P=quote)$", - 'author': r"^__author__\s=\s(?P<quote>['])(?P<author>[\w\s]*)(?P=quote)$", - 'author_email': r"^__author_email__\s=\s(?P<quote>['])(?P<author_email>.*)(?P=quote)$", - 'description': r"^__description__\s=\s(?P<quote>['])(?P<description>.*)(?P=quote)$", - 'project_url': r"^__project_url__\s=\s(?P<quote>['])(?P<project_url>.*)(?P=quote)$", - } - - with open('./pydockenv/__init__.py') as f: - raw_about = f.read() - - extract = partial(re.search, string=raw_about, flags=re.MULTILINE) - return {k: extract(v).group(k) for k, v in regexes.items()} - - -about = get_about() +with open('meta.json') as fin: + about = json.load(fin) class bdist_wheel(_bdist_wheel):