fix: get project version and description.

this will be improved after poetry fixed issue https://github.com/sdispater/poetry/issues/144
This commit is contained in:
debugtalk
2019-07-18 16:34:13 +08:00
parent 4946e70f30
commit 70b1c51fe8
+2 -7
View File
@@ -1,9 +1,4 @@
import configparser __version__ = "2.2.4"
import json __description__ = "One-stop solution for HTTP(S) testing."
cf_parser = configparser.ConfigParser(allow_no_value=True)
cf_parser.read("pyproject.toml")
__version__ = json.loads(cf_parser["tool.poetry"]["version"])
__description__ = json.loads(cf_parser["tool.poetry"]["description"])
__all__ = ["__version__", "__description__"] __all__ = ["__version__", "__description__"]