diff options
author | Robert Collins <rbtcollins@hp.com> | 2015-05-20 09:06:46 +1200 |
---|---|---|
committer | Roman Podoliaka <rpodolyaka@mirantis.com> | 2015-11-30 17:01:36 +0000 |
commit | 01359ef1671bf2b7ecd22c210b35c9987c3a0550 (patch) | |
tree | b7099cadc58f7e00802f29c2e53de204599cc125 | |
parent | 936ffc187d445ed7644d755bcdfa3be682b786fa (diff) | |
download | oslo-db-01359ef1671bf2b7ecd22c210b35c9987c3a0550.tar.gz |
Refactor deps to use extras and env markers4.1.0
Adds extras for e.g. nova to use for testing, so that oslo.db can
control the libraries used.
Removes test-requirements.txt - it becomes a single env-marker
controlled list, and shows how tox will access those dependencies.
Co-Authored-By: Roman Podoliaka <rpodolyaka@mirantis.com>
Change-Id: I97ef5bad215abe60d92c3fda4474c48ccb13eab0
-rw-r--r-- | setup.cfg | 35 | ||||
-rw-r--r-- | test-requirements.txt | 21 | ||||
-rw-r--r-- | tox.ini | 6 |
3 files changed, 32 insertions, 30 deletions
@@ -18,6 +18,36 @@ classifier = Programming Language :: Python :: 3 Programming Language :: Python :: 3.4 +[extras] +# So e.g. nova can test-depend on oslo.db[mysql] +mysql = + PyMySQL>=0.6.2 # MIT License +# or oslo.db[mysql-c] +mysql-c = + MySQL-python:python_version=='2.7' +# or oslo.db[postgresql] +postgresql = + psycopg2>=2.5 +# Dependencies for testing oslo.db itself. +test = + hacking<0.11,>=0.10.0 + coverage>=3.6 + discover + doc8 # Apache-2.0 + eventlet>=0.17.4 + fixtures>=1.3.1 + mock>=1.2 + python-subunit>=0.0.18 + sphinx!=1.2.0,!=1.3b1,<1.3,>=1.1.2 + oslosphinx!=3.4.0,>=2.5.0 # Apache-2.0 + oslotest>=1.10.0 # Apache-2.0 + testrepository>=0.0.18 + testtools>=1.4.0 + tempest-lib>=0.10.0 +fixtures = + testresources>=0.2.4 + testscenarios>=0.4 + [files] packages = oslo_db @@ -56,11 +86,6 @@ keywords = _ gettext ngettext l_ lazy_gettext mapping_file = babel.cfg output_file = oslo.db/locale/oslo.db.pot -[extras] -fixtures = - testresources>=0.2.4 - testscenarios>=0.4 - [pbr] warnerrors = True autodoc_index_modules = True diff --git a/test-requirements.txt b/test-requirements.txt deleted file mode 100644 index 582fb9c..0000000 --- a/test-requirements.txt +++ /dev/null @@ -1,21 +0,0 @@ -# The order of packages is significant, because pip processes them in the order -# of appearance. Changing the order has an impact on the overall integration -# process, which may cause wedges in the gate later. - -hacking<0.11,>=0.10.0 - -coverage>=3.6 -discover -doc8 # Apache-2.0 -eventlet>=0.17.4 -fixtures>=1.3.1 -mock>=1.2 -PyMySQL>=0.6.2 # MIT License -psycopg2>=2.5 -python-subunit>=0.0.18 -sphinx!=1.2.0,!=1.3b1,<1.3,>=1.1.2 -oslosphinx!=3.4.0,>=2.5.0 # Apache-2.0 -oslotest>=1.10.0 # Apache-2.0 -testrepository>=0.0.18 -testtools>=1.4.0 -tempest-lib>=0.10.0 @@ -7,8 +7,7 @@ whitelist_externals = bash env setenv = VIRTUAL_ENV={envdir} -deps = .[fixtures] - -r{toxinidir}/test-requirements.txt +deps = .[test,fixtures,mysql,postgresql] commands = bash tools/pretty_tox.sh '{posargs}' [testenv:sqla_09] @@ -21,11 +20,10 @@ commands = env TEST_EVENTLET=1 bash tools/pretty_tox.sh '{posargs}' [testenv:mysql-python] +deps = .[mysql-c,postgresql,test,fixtures] setenv = {[testenv]setenv} OS_TEST_DBAPI_ADMIN_CONNECTION=mysql://openstack_citest:openstack_citest@localhost/;postgresql://openstack_citest:openstack_citest@localhost/postgres;sqlite:// -commands = pip install MySQL-python - python setup.py testr --slowest --testr-args='{posargs}' [testenv:pep8] commands = flake8 |