Put db requirements to extra requirements

https://www.python.org/dev/peps/pep-0426/#extras-optional-dependencies

Python is a great language and it support extra requirements. In our
case, it can be used for listing database requirements.

This patch adds two separate extra requirements:
  * psycopg2 as for Postgres database backend
  * PyMySQL as for MySQL database backend

To install Rally with a specific database backend you need just to do
execute pip in right way:
    pip install rally[postgres]
  or
    pip install rally[mysql]

Change-Id: Ibf816758fc093a65b94e6a2b2c273a073275b393
This commit is contained in:
Andrey Kurilin 2017-07-18 12:16:10 +03:00
parent 19b85d4e6d
commit 55c50cadf4
2 changed files with 7 additions and 0 deletions

View File

@ -39,6 +39,12 @@ oslo.config.opts =
setup-hooks =
pbr.hooks.setup_hook
[extras]
mysql =
PyMySQL>=0.7.6 # MIT
postgres =
psycopg2>=2.5 # LGPL/ZPL
[build_sphinx]
all_files = 1
build-dir = doc/build

View File

@ -4,6 +4,7 @@ skipsdist = True
envlist = py35,py34,py27,pep8
[testenv]
extras = {env:RALLY_EXTRAS:}
setenv = VIRTUAL_ENV={envdir}
HOME={homedir}
LANG=en_US.UTF-8