diff --git a/doc/requirements.txt b/doc/requirements.txt index f98b33885..5d126f760 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -10,3 +10,4 @@ reno>=2.5.0 # Apache-2.0 fixtures>=3.0.0 # Apache-2.0/BSD kafka-python>=1.3.1 # Apache-2.0 pyngus>=2.2.0 # Apache-2.0 +tenacity>=3.2.1 # Apache-2.0 diff --git a/doc/source/admin/AMQP1.0.rst b/doc/source/admin/AMQP1.0.rst index c400c83e7..fbe690764 100644 --- a/doc/source/admin/AMQP1.0.rst +++ b/doc/source/admin/AMQP1.0.rst @@ -211,25 +211,37 @@ as the API is a very low-level interface to the AMQP protocol. Instead, the driver uses the pure python `Pyngus`_ client API, which is layered on top of the protocol engine. +In order to run the driver the Proton Python bindings, Proton +library, Proton header files, and Pyngus must be installed. + .. _Proton: http://qpid.apache.org/proton/index.html .. _Pyngus: https://github.com/kgiusti/pyngus -In order to run the driver the Proton Python bindings, Proton -library, Proton header files, and Pyngus must be installed. Pre-built -packages for both Pyngus and the Proton protocol engine are available -for various Linux distributions (see `packages`_ below). It is -recommended to use the pre-built packages if they are available for -your platform. +Source packages for the `Pyngus client API`_ are available via PyPI. + +.. _Pyngus client API: https://pypi.python.org/pypi/pyngus + +Pyngus depends on the Proton Python bindings. Source packages for the +`Proton Python bindings`_ are also available via PyPI. + +.. _Proton Python bindings: https://pypi.python.org/pypi/python-qpid-proton + +Since the AMQP 1.0 driver is an optional extension to Oslo.Messaging +these packages are not installed by default. Use the 'amqp1' extras +tag when installing Oslo.Messaging in order to pull in these extra +packages: + +:: + + pip install oslo.messaging[amqp1] The Proton package includes a C extension that links to the Proton -library. If this library is not installed, then the Proton install -script will attempt to download the necessary Proton C source files from -the Apache repository and build the library locally. +library. The C extension is built locally when the Proton source +packages are install from PyPI. In order to build the Proton C source +locally, there are a number of tools and libraries that need to be +present on the system: -In order to build the Proton C source locally, there are a number of -tools and libraries that need to be present: - -* The tools and library necessary for Python development +* The tools and library necessary for Python C development * The `SWIG`_ wrapper generator * The `OpenSSL`_ development libraries and headers * The `Cyrus SASL`_ development libraries and headers @@ -238,9 +250,14 @@ tools and libraries that need to be present: .. _OpenSSL: https://www.openssl.org .. _Cyrus SASL: https://cyrusimap.org -**Note well**: Currently the Proton Pypi package only supports building +**Note well**: Currently the Proton PyPI package only supports building the C extension on Linux systems. +Pre-built packages for both Pyngus and Proton engine are available for +various Linux distributions (see `packages`_ below). It is recommended +to use the pre-built packages if they are available for your platform. + + Router Intermediary ------------------- diff --git a/releasenotes/notes/use-extras-for-optional-deps-2a00e8007ef7a629.yaml b/releasenotes/notes/use-extras-for-optional-deps-2a00e8007ef7a629.yaml new file mode 100644 index 000000000..4d8c5a7f3 --- /dev/null +++ b/releasenotes/notes/use-extras-for-optional-deps-2a00e8007ef7a629.yaml @@ -0,0 +1,12 @@ +--- +prelude: > + Projects using any of the optional drivers can use extras to + pull in dependencies for that driver. +upgrade: + - | + Projects using the AMQP 1.0 driver may now depend on + oslo.messaging[amqp1]. Projects using the Kafka driver may now + depend on oslo.messaging[kafka] + + + diff --git a/setup.cfg b/setup.cfg index 795191d9f..8d20043cb 100644 --- a/setup.cfg +++ b/setup.cfg @@ -18,6 +18,20 @@ classifier = Programming Language :: Python :: 3 Programming Language :: Python :: 3.5 +[extras] +# package dependencies for optional (non-rabbitmq) messaging drivers. +# projects can test-depend on oslo.messaging[] +# e.g.: oslo.messaging[kafka,amqp1] +zmq = + pyzmq>=14.3.1 # LGPL+BSD + tenacity>=4.4.0 # Apache-2.0 + redis>=2.10.0 # MIT +amqp1 = + pyngus>=2.2.0 # Apache-2.0 +kafka = + kafka-python>=1.3.1 # Apache-2.0 + tenacity>=4.4.0 # Apache-2.0 + [files] packages = oslo_messaging diff --git a/test-requirements.txt b/test-requirements.txt index 82cefa2e0..0ca12322c 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -27,11 +27,6 @@ kafka-python>=1.3.1 # Apache-2.0 # deps = {[testenv]deps} coverage coverage!=4.4,>=4.0 # Apache-2.0 -# this is required for the docs build jobs -sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD -openstackdocstheme>=1.18.1 # Apache-2.0 -reno>=2.5.0 # Apache-2.0 - # AMQP 1.0 support depends on the Qpid Proton AMQP 1.0 # development libraries. pyngus>=2.2.0 # Apache-2.0