Move optional backend dependencies into setup.cfg [extras]
The dogpile and mongo backends are optional so therefore the dependencies that are only used for those backends are optional. This makes use of the 'extras' capability in setuptools to declare those as optional dependencies if you're using those backends. If a consumer of oslo.cache wants to use the dogpile backend, for example, then they install oslo.cache like 'sudo pip install oslo.cache[dogpile]'. Note that the dogpile dependency is left in requirements.txt because the oslo_cache.core module has an unconditional import on that library. Change-Id: I28332964d568bda405fb8d1376d50db49d288b94
This commit is contained in:
parent
c69635c195
commit
950a4448e3
@ -9,4 +9,3 @@ oslo.config>=2.1.0 # Apache-2.0
|
||||
oslo.i18n>=1.5.0 # Apache-2.0
|
||||
oslo.log>=1.8.0 # Apache-2.0
|
||||
oslo.utils>=2.0.0 # Apache-2.0
|
||||
python-memcached>=1.56
|
||||
|
@ -28,6 +28,12 @@ packages =
|
||||
oslo.config.opts =
|
||||
oslo.cache = oslo_cache._opts:list_opts
|
||||
|
||||
[extras]
|
||||
dogpile =
|
||||
python-memcached>=1.56
|
||||
mongo =
|
||||
pymongo>=3.0.2
|
||||
|
||||
[pbr]
|
||||
warnerrors = true
|
||||
autodoc_tree_index_modules = True
|
||||
|
@ -6,6 +6,3 @@ mock>=1.2
|
||||
oslotest>=1.10.0 # Apache-2.0
|
||||
oslosphinx>=2.5.0 # Apache-2.0
|
||||
sphinx!=1.2.0,!=1.3b1,<1.3,>=1.1.2
|
||||
|
||||
# Optional dogpile backend: MongoDB
|
||||
pymongo>=3.0.2
|
||||
|
3
tox.ini
3
tox.ini
@ -12,7 +12,8 @@ envlist = py34,py26,py27,pypy,pep8
|
||||
install_command = pip install -U {opts} {packages}
|
||||
setenv =
|
||||
VIRTUAL_ENV={envdir}
|
||||
deps = -r{toxinidir}/requirements.txt
|
||||
deps = .[dogpile]
|
||||
.[mongo]
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
commands = python setup.py testr --slowest --testr-args='{posargs}'
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user