Add explicit dependencies for store dependencies

This adds explicit dependencies for the stores in the extras section.
Users can now install glance_store and specify which backends to install
dependencies. For example:

    $ pip install glance_store[swift]

should install glance_store and the dependences to use the swift store
(currently python-swiftclient and httplib2).

This has a number of benefits, primarily that if the dependencies for a
particular store change, the installation process should remain the
same.

Change-Id: I94d75e3d52c9e3e9f7a741a079d25b1bdff29b27
This commit is contained in:
Louis Taylor 2015-07-29 15:58:49 +00:00
parent cd04b9217f
commit 29a84f7ced
3 changed files with 15 additions and 20 deletions

View File

@ -52,6 +52,20 @@ glance_store.drivers =
oslo.config.opts =
glance.store = glance_store.backend:_list_opts
[extras]
# Dependencies for each of the optional stores
s3 =
boto>=2.32.1
vmware =
oslo.vmware>=1.16.0 # Apache-2.0
swift =
httplib2>=0.7.5
python-swiftclient>=2.2.0
gridfs =
pymongo>=3.0.2
cinder =
python-cinderclient>=1.3.1
[build_sphinx]
source-dir = doc/source
build-dir = doc/build

View File

@ -20,23 +20,3 @@ oslotest>=1.5.1 # Apache-2.0
# this is required for the docs build jobs
sphinx!=1.2.0,!=1.3b1,<1.3,>=1.1.2
oslosphinx>=2.5.0 # Apache-2.0
#
# Store specific packages
#
# For S3 storage backend
boto>=2.32.1
# For VMware storage backend.
oslo.vmware>=0.13.1 # Apache-2.0
# Swift Backend
httplib2>=0.7.5
python-swiftclient>=2.2.0
# GridFS backend
pymongo>=3.0.2
# Cinder backend
python-cinderclient>=1.2.2

View File

@ -9,6 +9,7 @@ usedevelop = True
install_command = pip install --allow-all-external --allow-insecure netaddr -U {opts} {packages}
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
.[s3,vmware,swift,gridfs,cinder]
commands = python setup.py testr --slowest --testr-args='{posargs}'
[tox:jenkins]