Refactor deps to use extras and env markers
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
This commit is contained in:
parent
936ffc187d
commit
01359ef167
35
setup.cfg
35
setup.cfg
|
@ -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
|
||||
|
|
|
@ -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
|
6
tox.ini
6
tox.ini
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue