Use extras in setup.cfg for deps

Change-Id: Ief2184f83412bfc7db9dde869def08b2e9ab3c66
This commit is contained in:
Julien Danjou 2015-12-21 18:05:02 +01:00
parent e9981a733b
commit 747302c93e
4 changed files with 19 additions and 21 deletions

View File

@ -21,6 +21,8 @@ GNOCCHI_DATA=`mktemp -d /tmp/gnocchi-data-XXXXX`
MYSQL_DATA=`mktemp -d /tmp/gnocchi-mysql-XXXXX`
trap "clean_exit \"$GNOCCHI_DATA\" \"$MYSQL_DATA\"" EXIT
pip install http://tarballs.openstack.org/gnocchi/gnocchi-master.tar.gz#egg=gnocchi[mysql,file]
mysqld --initialize-insecure --datadir=${MYSQL_DATA} || true
mkfifo ${MYSQL_DATA}/out
PATH=$PATH:/usr/libexec
@ -30,7 +32,6 @@ wait_for_line "mysqld: ready for connections." ${MYSQL_DATA}/out
export GNOCCHI_TEST_INDEXER_URL="mysql+pymysql://root@localhost/test?unix_socket=${MYSQL_DATA}/mysql.socket&charset=utf8"
mysql --no-defaults -S ${MYSQL_DATA}/mysql.socket -e 'CREATE DATABASE test;'
mkfifo ${GNOCCHI_DATA}/out
echo '{"default": ""}' > ${GNOCCHI_DATA}/policy.json
cat > ${GNOCCHI_DATA}/gnocchi.conf <<EOF

View File

@ -29,6 +29,19 @@ console_scripts =
keystoneauth1.plugin =
gnocchi-noauth = gnocchiclient.noauth:GnocchiNoAuthLoader
[extras]
test =
coverage>=3.6
python-subunit>=0.0.18
oslotest>=1.10.0 # Apache-2.0
tempest-lib>=0.6.1
testrepository>=0.0.18
testtools>=1.4.0
doc =
sphinx!=1.2.0,!=1.3b1,>=1.1.2
oslosphinx>=2.5.0 # Apache-2.0
[build_sphinx]
source-dir = doc/source

View File

@ -1,17 +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
python-subunit>=0.0.18
sphinx!=1.2.0,!=1.3b1,>=1.1.2
oslosphinx>=2.5.0 # Apache-2.0
oslotest>=1.10.0 # Apache-2.0
tempest-lib>=0.6.1
testrepository>=0.0.18
testtools>=1.4.0
http://tarballs.openstack.org/gnocchi/gnocchi-master.tar.gz#egg=gnocchi[mysql,file]
# FIXME(sileht): should be in gnocchi ?
keystonemiddleware

View File

@ -5,25 +5,26 @@ skipsdist = True
[testenv]
usedevelop = True
install_command = pip install -U --allow-external gnocchi --allow-insecure gnocchi {opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
GNOCCHI_CLIENT_EXEC_DIR={envdir}/bin
passenv = GNOCCHI_* OS_TEST_TIMEOUT OS_STDOUT_CAPTURE OS_STDERR_CAPTURE OS_LOG_CAPTURE
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
deps = .[test]
commands = {toxinidir}/setup-tests.sh python setup.py test --slowest --testr-args='{posargs}'
[testenv:pep8]
deps = hacking<0.11,>=0.10.0
commands = flake8
[testenv:venv]
deps = .[doc]
commands = {posargs}
[testenv:cover]
commands = python setup.py test --coverage --testr-args='{posargs}'
[testenv:docs]
deps = .[doc]
commands =
rm -rf doc/source/ref
python setup.py build_sphinx