From 6b1fefe979cd1d45827a10f71ef98957b4bad64d Mon Sep 17 00:00:00 2001 From: Pavlo Shchelokovskyy Date: Wed, 1 Mar 2017 17:21:33 +0200 Subject: [PATCH] Do not depend on python-openstackclient OpenStack client is not a runtime dependency of ironicclient, and having it in requirements just brings in many dependencies which might not be needed at all when using the Python API of the client only (for example in server-side applications). Although dependency on osc-lib is enough for unit tests, add python-openstackclient to test-requirements so that functional tests pass. Also, add a setuptools 'extra' so that users can install python-openstackclient together with ironicclient if wishing to do so as follows: pip install python-ironicclient[cli] Change-Id: Ic7d06e61cd234b327613287802361c58bf6bf11e Closes-Bug: #1562023 --- .../no-osc-requirement-411f25fd10f18caa.yaml | 15 +++++++++++++++ requirements.txt | 1 - setup.cfg | 4 ++++ test-requirements.txt | 1 + 4 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/no-osc-requirement-411f25fd10f18caa.yaml diff --git a/releasenotes/notes/no-osc-requirement-411f25fd10f18caa.yaml b/releasenotes/notes/no-osc-requirement-411f25fd10f18caa.yaml new file mode 100644 index 000000000..a28a9ad3d --- /dev/null +++ b/releasenotes/notes/no-osc-requirement-411f25fd10f18caa.yaml @@ -0,0 +1,15 @@ +--- +upgrade: + - | + ``python-ironicclient`` package no longer has + the ``python-openstackclient`` package (OSC) as a requirement. + + Users installing only the ``python-ironicclient`` package will not + automatically get access to ``openstack baremetal ...`` OSC commands. + To have them available, the ``python-openstackclient`` package must + be installed separately, or, when installing ``python-ironicclient`` + via ``pip``, the new ``cli`` extra can be used to also install OSC: + + .. code-block:: shell + + pip install python-ironicclient[cli] diff --git a/requirements.txt b/requirements.txt index 58a70b723..7f6e1ea9b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,7 +11,6 @@ oslo.i18n>=3.15.3 # Apache-2.0 oslo.serialization!=2.19.1,>=2.18.0 # Apache-2.0 oslo.utils>=3.28.0 # Apache-2.0 PrettyTable<0.8,>=0.7.1 # BSD -python-openstackclient>=3.12.0 # Apache-2.0 PyYAML>=3.10 # MIT requests>=2.14.2 # Apache-2.0 six>=1.9.0 # MIT diff --git a/setup.cfg b/setup.cfg index 940a55577..92c053081 100644 --- a/setup.cfg +++ b/setup.cfg @@ -111,3 +111,7 @@ warning-is-error = 1 [wheel] universal = 1 + +[extras] +cli = + python-openstackclient>=3.12.0 # Apache-2.0 diff --git a/test-requirements.txt b/test-requirements.txt index 455e9ee3a..3d66d8589 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -17,3 +17,4 @@ testtools>=1.4.0 # MIT tempest>=16.1.0 # Apache-2.0 os-testr>=1.0.0 # Apache-2.0 ddt>=1.0.1 # MIT +python-openstackclient>=3.12.0 # Apache-2.0