aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYujun Zhang <zhang.yujunz@zte.com.cn>2016-11-24 14:01:47 +0800
committerYujun Zhang <zhang.yujunz@zte.com.cn>2016-11-24 17:06:18 +0800
commit6200c67619329f686dfb888ac7ef25469375df83 (patch)
tree4065d07425689b410843a21c7390e60d76820eb9
parent213003bb409e02bfab6929ccffe88728a89028e2 (diff)
Use `pbr` for setup configuration
- `pbr` does a bunch of things[1] and is used widely in OpenStack - moved legacy `qtip.py` to scripts in order to keep the project folder clean [1]: http://docs.openstack.org/developer/pbr/#what-it-does Change-Id: I6a9b83883283eaa527e2c3d4cd8d221ee6efca41 Signed-off-by: Yujun Zhang <zhang.yujunz@zte.com.cn>
-rw-r--r--__init__.py0
-rwxr-xr-xdocker/run_qtip.sh14
-rw-r--r--qtip/__init__.py14
-rw-r--r--scripts/qtip.py (renamed from qtip.py)0
-rw-r--r--setup.cfg22
-rw-r--r--setup.py16
-rw-r--r--tox.ini2
7 files changed, 48 insertions, 20 deletions
diff --git a/__init__.py b/__init__.py
deleted file mode 100644
index e69de29b..00000000
--- a/__init__.py
+++ /dev/null
diff --git a/docker/run_qtip.sh b/docker/run_qtip.sh
index a7a20501..c2cf8c7b 100755
--- a/docker/run_qtip.sh
+++ b/docker/run_qtip.sh
@@ -1,20 +1,22 @@
#! /bin/bash
+QTIP=scripts/qtip.py
+
run_test_suite()
{
if [ "$TEST_CASE" == "compute" ]; then
- cd ${QTIP_DIR} && python qtip.py -l default -f compute
+ cd ${QTIP_DIR} && python ${QTIP} -l default -f compute
cd ${QTIP_DIR} && python scripts/ref_results/suite_result.py compute
elif [ "$TEST_CASE" == "storage" ]; then
- cd ${QTIP_DIR} && python qtip.py -l default -f storage
+ cd ${QTIP_DIR} && python ${QTIP} -l default -f storage
cd ${QTIP_DIR} && python scripts/ref_results/suite_result.py storage
elif [ "$TEST_CASE" == "network" ]; then
- cd ${QTIP_DIR} && python qtip.py -l default -f network
+ cd ${QTIP_DIR} && python ${QTIP} -l default -f network
cd ${QTIP_DIR} && python scripts/ref_results/suite_result.py network
elif [ "$TEST_CASE" == "all" ]; then
- cd ${QTIP_DIR} && python qtip.py -l default -f compute
- cd ${QTIP_DIR} && python qtip.py -l default -f storage
- cd ${QTIP_DIR} && python qtip.py -l default -f network
+ cd ${QTIP_DIR} && python ${QTIP} -l default -f compute
+ cd ${QTIP_DIR} && python ${QTIP} -l default -f storage
+ cd ${QTIP_DIR} && python ${QTIP} -l default -f network
cd ${QTIP_DIR} && python scripts/ref_results/suite_result.py compute
cd ${QTIP_DIR} && python scripts/ref_results/suite_result.py storage
diff --git a/qtip/__init__.py b/qtip/__init__.py
index e69de29b..228d036f 100644
--- a/qtip/__init__.py
+++ b/qtip/__init__.py
@@ -0,0 +1,14 @@
+##############################################################################
+# Copyright (c) 2016 ZTE Corp and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+import pbr.version
+
+
+__version__ = pbr.version.VersionInfo(
+ 'qtip').version_string()
diff --git a/qtip.py b/scripts/qtip.py
index 66ff674f..66ff674f 100644
--- a/qtip.py
+++ b/scripts/qtip.py
diff --git a/setup.cfg b/setup.cfg
new file mode 100644
index 00000000..42f8a61d
--- /dev/null
+++ b/setup.cfg
@@ -0,0 +1,22 @@
+[metadata]
+name = qtip
+summary = Platform Performance Benchmarking
+description-file =
+ README.md
+author = OPNFV
+author-email = opnfv-tech-discuss@lists.opnfv.org
+home-page = https://wiki.opnfv.org/display/qtip
+
+[global]
+setup-hooks =
+ pbr.hooks.setup_hook
+
+[entry_points]
+console_scripts =
+ qtip = qti.cli:entry
+
+[files]
+packages =
+ qtip
+data_files =
+ etc/qtip = benchmarks/*
diff --git a/setup.py b/setup.py
index 15900362..ce14d42e 100644
--- a/setup.py
+++ b/setup.py
@@ -2,19 +2,7 @@
from setuptools import setup
-
setup(
- name='qtip-cli',
- version='0.1.dev0',
- description='Platform Performance Benchmarking for OPNFV',
- author='OPNFV',
- author_email='zhang.yujunz@zte.com.cn',
- install_requires=['click', 'pyyaml', 'prettytable'],
- packages=['qtip.cli'],
- entry_points={
- 'console_scripts': ['qtip=qtip.cli.entry:cli']
- },
- license='Apache-2.0',
- keywords="performance benchmark opnfv",
- url="https://wiki.opnfv.org/display/qtip"
+ setup_requires=['pbr>=1.9', 'setuptools>=17.1'],
+ pbr=True,
)
diff --git a/tox.ini b/tox.ini
index f5859b6e..0ca99932 100644
--- a/tox.ini
+++ b/tox.ini
@@ -17,6 +17,8 @@ commands=
py.test \
--basetemp={envtmpdir} \
{posargs}
+setenv=
+ PYTHONPATH = {toxinidir}
[testenv:pep8]
deps = flake8