From 68227f6c0ea4fab13a4696e7cebc09ccda6e63e1 Mon Sep 17 00:00:00 2001 From: debugtalk Date: Mon, 26 Feb 2018 19:34:15 +0800 Subject: [PATCH] bugfix: instal with dependencies --- httprunner/__about__.py | 9 +++++++++ httprunner/__init__.py | 2 -- httprunner/cli.py | 4 ++-- setup.py | 21 +++++++++++++-------- 4 files changed, 24 insertions(+), 12 deletions(-) create mode 100644 httprunner/__about__.py diff --git a/httprunner/__about__.py b/httprunner/__about__.py new file mode 100644 index 00000000..9e3940f9 --- /dev/null +++ b/httprunner/__about__.py @@ -0,0 +1,9 @@ +__title__ = 'HttpRunner' +__description__ = 'HTTP test runner, not just about api test and load test.' +__url__ = 'https://github.com/HttpRunner/HttpRunner' +__version__ = '0.9.6' +__author__ = 'debugtalk' +__author_email__ = 'mail@debugtalk.com' +__license__ = 'MIT' +__copyright__ = 'Copyright 2017 debugtalk' +__cake__ = u'\u2728 \U0001f370 \u2728' \ No newline at end of file diff --git a/httprunner/__init__.py b/httprunner/__init__.py index 770bcf05..e41047bc 100644 --- a/httprunner/__init__.py +++ b/httprunner/__init__.py @@ -1,3 +1 @@ -__version__ = '0.9.5a' - from httprunner.task import HttpRunner diff --git a/httprunner/cli.py b/httprunner/cli.py index 039eeebd..6c85466f 100644 --- a/httprunner/cli.py +++ b/httprunner/cli.py @@ -4,8 +4,8 @@ import os import sys import unittest -from httprunner import __version__ as hrun_version from httprunner import logger +from httprunner.__about__ import __version__ from httprunner.task import HttpRunner from httprunner.utils import create_scaffold, print_output, string_type @@ -41,7 +41,7 @@ def main_hrun(): logger.setup_logger(args.log_level) if args.version: - logger.color_print("{}".format(hrun_version), "GREEN") + logger.color_print("{}".format(__version__), "GREEN") exit(0) project_name = args.startproject diff --git a/setup.py b/setup.py index 109f7904..d17d83b0 100644 --- a/setup.py +++ b/setup.py @@ -1,9 +1,14 @@ #encoding: utf-8 import io +import os -from httprunner import __version__ from setuptools import find_packages, setup +about = {} +here = os.path.abspath(os.path.dirname(__file__)) +with io.open(os.path.join(here, 'httprunner', '__about__.py'), encoding='utf-8') as f: + exec(f.read(), about) + with io.open("README.rst", encoding='utf-8') as f: long_description = f.read() @@ -17,14 +22,14 @@ install_requires = [ ] setup( - name='HttpRunner', - version=__version__, - description='HTTP test runner, not just about api test and load test.', + name=about['__title__'], + version=about['__version__'], + description=about['__description__'], long_description=long_description, - author='Leo Lee', - author_email='mail@debugtalk.com', - url='https://github.com/HttpRunner/HttpRunner', - license='MIT', + author=about['__author__'], + author_email=about['__author_email__'], + url=about['__url__'], + license=about['__license__'], packages=find_packages(exclude=["examples", "tests", "tests.*"]), package_data={ 'httprunner': ["templates/*"],