Merge "Split requirements in smaller part"

This commit is contained in:
Jenkins 2015-12-15 18:42:48 +00:00 committed by Gerrit Code Review
commit 2376a0a102
9 changed files with 90 additions and 47 deletions

View File

@ -361,7 +361,7 @@ function install_gnocchi {
install_gnocchiclient install_gnocchiclient
# We don't use setup_package because we don't follow openstack/requirements # We don't use setup_package because we don't follow openstack/requirements
sudo -H pip install -e "$GNOCCHI_DIR" sudo -H pip install -e "$GNOCCHI_DIR"[test,$GNOCCHI_STORAGE_BACKEND,$DATABASE_TYPE]
if [ "$GNOCCHI_USE_MOD_WSGI" == "True" ]; then if [ "$GNOCCHI_USE_MOD_WSGI" == "True" ]; then
install_apache_wsgi install_apache_wsgi

View File

@ -15,7 +15,6 @@ import os
import subprocess import subprocess
import oslosphinx import oslosphinx
import sphinx_bootstrap_theme
# If extensions (or modules to document with autodoc) are in another directory, # If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the # add these directories to sys.path here. If the directory is relative to the
@ -119,11 +118,12 @@ if html_theme == "bootstrap":
'navbar_pagenav': False, 'navbar_pagenav': False,
'globaltoc_depth': 2, 'globaltoc_depth': 2,
} }
import sphinx_bootstrap_theme
html_theme_path = [sphinx_bootstrap_theme.get_html_theme_path()]
else:
html_theme_path = [os.path.join(os.path.dirname(oslosphinx.__file__),
'theme')]
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
html_theme_path = ([os.path.join(os.path.dirname(oslosphinx.__file__), 'theme')]
+ sphinx_bootstrap_theme.get_html_theme_path())
# The name for this set of Sphinx documents. If None, it defaults to # The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation". # "<project> v<release> documentation".

View File

@ -40,15 +40,27 @@ Then, you can start devstack:
./stack.sh ./stack.sh
Installation
============
Installation Using Sources To install Gnocchi using `pip`, just type::
==========================
To install Gnocchi, run the standard Python installation procedure: pip install gnocchi
:: Depending on the drivers you want to use, you need to install extra flavors
using, for example::
pip install -e . pip install gnocchi[postgresql,ceph]
To install Gnocchi from source, run the standard Python installation
procedure::
pip install -e .
Again, sepending on the drivers you want to use, you need to install extra
flavors using, for example::
pip install -e .[postgresql,ceph]
Configuration Configuration

View File

@ -20,7 +20,10 @@ import uuid
from oslo_config import cfg from oslo_config import cfg
import retrying import retrying
import six import six
from swiftclient import client as swclient try:
from swiftclient import client as swclient
except ImportError:
swclient = None
from gnocchi import storage from gnocchi import storage
from gnocchi.storage import _carbonara from gnocchi.storage import _carbonara
@ -64,6 +67,8 @@ def retry_if_result_empty(result):
class SwiftStorage(_carbonara.CarbonaraBasedStorage): class SwiftStorage(_carbonara.CarbonaraBasedStorage):
def __init__(self, conf): def __init__(self, conf):
super(SwiftStorage, self).__init__(conf) super(SwiftStorage, self).__init__(conf)
if swclient is None:
raise RuntimeError("python-swiftclient unavailable")
self.swift = swclient.Connection( self.swift = swclient.Connection(
auth_version=conf.swift_auth_version, auth_version=conf.swift_auth_version,
authurl=conf.swift_authurl, authurl=conf.swift_authurl,

View File

@ -22,7 +22,10 @@ from oslotest import base
from oslotest import mockpatch from oslotest import mockpatch
import six import six
from stevedore import extension from stevedore import extension
from swiftclient import exceptions as swexc try:
from swiftclient import exceptions as swexc
except ImportError:
swexc = None
from testtools import testcase from testtools import testcase
from tooz import coordination from tooz import coordination
@ -373,9 +376,10 @@ class TestCase(base.BaseTestCase):
except indexer.ArchivePolicyAlreadyExists: except indexer.ArchivePolicyAlreadyExists:
pass pass
self.useFixture(mockpatch.Patch( if swexc:
'swiftclient.client.Connection', self.useFixture(mockpatch.Patch(
FakeSwiftClient)) 'swiftclient.client.Connection',
FakeSwiftClient))
self.useFixture(mockpatch.Patch('gnocchi.storage.ceph.rados', self.useFixture(mockpatch.Patch('gnocchi.storage.ceph.rados',
FakeRadosModule())) FakeRadosModule()))

View File

@ -1,35 +1,22 @@
numpy numpy
oslo.config>=2.6.0 oslo.config>=2.6.0
oslo.db>=1.8.0
oslo.log>=1.0.0 oslo.log>=1.0.0
oslo.policy>=0.3.0 oslo.policy>=0.3.0
oslo.serialization>=1.4.0 oslo.serialization>=1.4.0
oslo.utils>=1.6.0 oslo.utils>=1.6.0
oslo.middleware oslo.middleware
oslosphinx>=2.2.0 # Apache-2.0
pandas>=0.17.0 pandas>=0.17.0
pecan>=0.9 pecan>=0.9
python-swiftclient>=2.5.0
pytimeparse>=1.1.5 pytimeparse>=1.1.5
futures futures
requests requests
six six
sqlalchemy
sqlalchemy-utils
stevedore stevedore
tooz>=0.11
voluptuous voluptuous
werkzeug werkzeug
Jinja2
PyYAML
msgpack-python
trollius trollius
retrying retrying
WebOb>=1.4.1 WebOb>=1.4.1
alembic>=0.7.6,!=0.8.1
psycopg2
pymysql
keystonemiddleware>=2.3.0 keystonemiddleware>=2.3.0
PasteDeploy PasteDeploy
sphinx_bootstrap_theme
prettytable prettytable

View File

@ -19,6 +19,53 @@ classifier =
Programming Language :: Python :: 3.4 Programming Language :: Python :: 3.4
Topic :: System :: Monitoring Topic :: System :: Monitoring
[extras]
mysql =
pymysql
oslo.db>=1.8.0
sqlalchemy
sqlalchemy-utils
alembic>=0.7.6,!=0.8.1
postgresql =
psycopg2
oslo.db>=1.8.0
sqlalchemy
sqlalchemy-utils
alembic>=0.7.6,!=0.8.1
influxdb =
influxdb>=2.4
swift =
python-swiftclient>=2.5.0
msgpack-python
tooz>=0.11
ceph =
msgpack-python
tooz>=0.11
file =
msgpack-python
tooz>=0.11
doc =
oslosphinx>=2.2.0
sphinx
sphinxcontrib-httpdomain
PyYAML
Jinja2
test =
gabbi>=0.101.2
coverage>=3.6
fixtures
mock
oslotest
python-subunit>=0.0.18
tempest-lib>=0.2.0
testrepository
testscenarios
testtools>=0.9.38
WebTest>=2.0.16
doc8
sysv_ipc
tooz>=0.11
[global] [global]
setup-hooks = setup-hooks =
pbr.hooks.setup_hook pbr.hooks.setup_hook

View File

@ -1,16 +0,0 @@
gabbi>=0.101.2
coverage>=3.6
fixtures
mock
oslotest
sphinx
python-subunit>=0.0.18
tempest-lib>=0.2.0
testrepository
testscenarios
testtools>=0.9.38
WebTest>=2.0.16
doc8
sphinxcontrib-httpdomain
influxdb>=2.4
sysv_ipc

View File

@ -6,8 +6,7 @@ envlist = py{27,34},py{27,34}-{postgresql,mysql}{,-file,-swift,-ceph,-influxdb},
usedevelop = True usedevelop = True
sitepackages = False sitepackages = False
passenv = LANG OS_TEST_TIMEOUT OS_STDOUT_CAPTURE OS_STDERR_CAPTURE OS_LOG_CAPTURE GNOCCHI_TEST_* passenv = LANG OS_TEST_TIMEOUT OS_STDOUT_CAPTURE OS_STDERR_CAPTURE OS_LOG_CAPTURE GNOCCHI_TEST_*
deps = -r{toxinidir}/requirements.txt deps = .[mysql,postgresql,test,file,influxdb,ceph,swift]
-r{toxinidir}/test-requirements.txt
setenv = setenv =
GNOCCHI_TEST_STORAGE_DRIVERS=file swift ceph GNOCCHI_TEST_STORAGE_DRIVERS=file swift ceph
GNOCCHI_TEST_INDEXER_DRIVERS=postgresql mysql GNOCCHI_TEST_INDEXER_DRIVERS=postgresql mysql
@ -52,6 +51,8 @@ commands = {toxinidir}/setup-mysql-tests.sh {toxinidir}/tools/pretty_tox.sh '{po
commands = {toxinidir}/setup-mysql-tests.sh python setup.py testr --coverage --testr-args="{posargs}" commands = {toxinidir}/setup-mysql-tests.sh python setup.py testr --coverage --testr-args="{posargs}"
[testenv:venv] [testenv:venv]
# This is used by the doc job on the gate
deps = .[file,postgresql,test,doc]
setenv = GNOCCHI_TEST_STORAGE_DRIVER=file setenv = GNOCCHI_TEST_STORAGE_DRIVER=file
commands = {toxinidir}/setup-postgresql-tests.sh {posargs} commands = {toxinidir}/setup-postgresql-tests.sh {posargs}
@ -63,10 +64,13 @@ show-source = true
commands = oslo-config-generator --config-file=etc/gnocchi/gnocchi-config-generator.conf commands = oslo-config-generator --config-file=etc/gnocchi/gnocchi-config-generator.conf
[testenv:docs] [testenv:docs]
deps = .[file,postgresql,test,doc]
setenv = GNOCCHI_TEST_STORAGE_DRIVER=file setenv = GNOCCHI_TEST_STORAGE_DRIVER=file
commands = doc8 --ignore-path doc/source/rest.rst doc/source commands = doc8 --ignore-path doc/source/rest.rst doc/source
{toxinidir}/setup-postgresql-tests.sh python setup.py build_sphinx {toxinidir}/setup-postgresql-tests.sh python setup.py build_sphinx
[testenv:docs-gnocchi.xyz] [testenv:docs-gnocchi.xyz]
deps = .[file,postgresql,test,doc]
sphinx_bootstrap_theme
setenv = GNOCCHI_TEST_STORAGE_DRIVER=file setenv = GNOCCHI_TEST_STORAGE_DRIVER=file
commands = {toxinidir}/setup-postgresql-tests.sh sphinx-build -D html_theme=bootstrap doc/source doc/build commands = {toxinidir}/setup-postgresql-tests.sh sphinx-build -D html_theme=bootstrap doc/source doc/build