From 3e013ff8f4b84f524f62152d293321cecbc1856b Mon Sep 17 00:00:00 2001 From: Mehdi Abaakouk Date: Wed, 14 Sep 2016 09:50:39 +0200 Subject: [PATCH] Use deps extra for optional requirements Related-Bug: #1621384 Change-Id: I227c121b69ac1f51ed922e0b11bec005928aacab --- requirements.txt | 1 - setup.cfg | 12 ++++++++++++ test-requirements.txt | 4 ---- tox.ini | 3 ++- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/requirements.txt b/requirements.txt index 8d8eae27a0..9cf8362c94 100644 --- a/requirements.txt +++ b/requirements.txt @@ -13,7 +13,6 @@ kafka-python<1.0.0,>=0.9.5 # Apache-2.0 keystonemiddleware!=4.1.0,>=4.0.0 # Apache-2.0 lxml>=2.3 # BSD msgpack-python>=0.4.0 # Apache-2.0 -oslo.db>=4.1.0 # Apache-2.0 oslo.concurrency>=3.5.0 # Apache-2.0 oslo.config>=3.9.0 # Apache-2.0 oslo.i18n>=2.1.0 # Apache-2.0 diff --git a/setup.cfg b/setup.cfg index c3cd821c8c..3d46726cc2 100644 --- a/setup.cfg +++ b/setup.cfg @@ -31,6 +31,18 @@ packages = data_files = etc/ceilometer = etc/ceilometer/* +[extras] +gnocchi = + gnocchiclient>=2.2.0 # Apache-2.0 +mongo = + pymongo!=3.1,>=3.0.2 # Apache-2.0 +postgresql = + oslo.db>=4.1.0 # Apache-2.0 + psycopg2>=2.5 # LGPL/ZPL +mysql = + oslo.db>=4.1.0 # Apache-2.0 + PyMySQL>=0.6.2 # MIT License + [entry_points] ceilometer.notification = instance = ceilometer.compute.notifications.instance:Instance diff --git a/test-requirements.txt b/test-requirements.txt index ab4b123182..422a4cbf70 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -8,7 +8,6 @@ elasticsearch>=1.3.0 # Apache-2.0 fixtures<2.0,>=1.3.1 # Apache-2.0/BSD happybase!=0.7,>=0.5,<1.0.0;python_version=='2.7' # MIT mock>=1.2 # BSD -PyMySQL>=0.6.2 # MIT License os-win>=0.2.3 # Apache-2.0 oslo.cache>=1.5.0 # Apache-2.0 # Docs Requirements @@ -17,9 +16,6 @@ oslosphinx!=3.4.0,>=2.5.0 # Apache-2.0 reno>=1.6.2 # Apache2 oslotest>=1.10.0 # Apache-2.0 oslo.vmware>=1.16.0 # Apache-2.0 -psycopg2>=2.5 # LGPL/ZPL -pymongo!=3.1,>=3.0.2 # Apache-2.0 -gnocchiclient>=2.2.0 # Apache-2.0 python-subunit>=0.0.18 # Apache-2.0/BSD sphinx!=1.2.0,!=1.3b1,<1.3,>=1.1.2 # BSD sphinxcontrib-httpdomain # BSD diff --git a/tox.ini b/tox.ini index 03143eb5b2..a67526cb85 100644 --- a/tox.ini +++ b/tox.ini @@ -4,8 +4,9 @@ skipsdist = True envlist = py34,py27,py35,functional,py34-functional,py35-functional,pep8 [testenv] -deps = -r{toxinidir}/requirements.txt +deps = .[mongo,mysql,postgresql,gnocchi] -r{toxinidir}/test-requirements.txt + install_command = pip install -U {opts} {packages} usedevelop = True setenv = VIRTUAL_ENV={envdir}