[openstack-dev] [All]Optional dependencies and requirements.txt

Ben Nemec openstack at nemebean.com
Wed Mar 26 18:10:01 UTC 2014


I have submitted a couple of changes to start us down the path to better 
optional dependency support, as discussed below.  There are still some 
issues to be worked out, like how to specify a default for a particular 
project (I punted on this for the oslo.messaging POC and left kombu as a 
hard requirement), but I think this is progress.  Let me know if you 
have any comments.

pbr change to support the nested dependencies: 
https://review.openstack.org/#/c/83149/

oslo.messaging POC demonstrating how this could be done: 
https://review.openstack.org/#/c/83150/

Thanks.

-Ben

On 02/17/2014 05:06 PM, Ben Nemec wrote:
> On 2014-02-12 18:22, David Koo wrote:
>>> We could use a separate requirements file for each driver, following
>>> a naming
>>> convention to let installation tools pick up the right file.  For
>>> example,
>>> oslo.messaging might include amqp-requirements.txt,
>>> qpid-requirements.txt,
>>> zmq-requirements.txt, etc.
>>
>> If we're going to have more than one requirement file then may I propose
>> something like a requirements.d directory and putting the files in that
>> directory (and no need for a -requirements suffix)?
>>
>>     requirements.d/
>>         global
>>         amqp
>>         qpid
>>         zmq
>>         ...
>>
>> Somehow seems cleaner.
>
> This makes sense to me as well, especially since I think we're going to
> end up with somewhat of a proliferation of these files over time.  I'm
> pretty sure I'm about to hit the same issue with different cinder
> backends that have different requirements, so it's not just messaging
> that's affected.
>
> If nobody objects to this approach, I'll look into supporting the
> requirements.d style going forward.
>
> -Ben
>
>>
>> --
>> Koo
>>
>> On Wed, 12 Feb 2014 16:42:17 -0500
>> Doug Hellmann <doug.hellmann at dreamhost.com> wrote:
>>
>>> On Wed, Feb 12, 2014 at 3:58 PM, Ben Nemec <openstack at nemebean.com>
>>> wrote:
>>>
>>> > Hi all,
>>> >
>>> > This is an issue that has come up recently in tripleo as we try to
>>> > support more varied configurations.  Currently qpid-python is not
>>> > listed in requirements.txt for many of the OpenStack projects, even
>>> > though they support using Qpid as a messaging broker.  This means
>>> > that when we install from source in tripleo we have to dynamically
>>> > add a line to requirements.txt if we want to use Qpid (we pip
>>> > install -r to handle deps). There seems to be disagreement over the
>>> > correct way to handle this, so Joe requested on my proposed Nova
>>> > change that I raise the issue here.
>>> >
>>> > There's already some discussion on the bug here:
>>> > https://bugs.launchpad.net/heat/+bug/1225191 as well as a separate
>>> > Neutron bug here: https://bugs.launchpad.net/neutron/+bug/1225232
>>> >
>>> > If there's a better alternative to "require all the things" I'm
>>> > certainly interested to hear it.  I expect we're going to hit this
>>> > more in the future as we add support for other optional backends
>>> > for services and such.
>>> >
>>>
>>> We could use a separate requirements file for each driver, following a
>>> naming convention to let installation tools pick up the right file.
>>> For example, oslo.messaging might include amqp-requirements.txt,
>>> qpid-requirements.txt, zmq-requirements.txt, etc.
>>>
>>> That would complicate the global requirements sync script, but not
>>> terribly so.
>>>
>>> Thoughts?
>>>
>>> Doug
>>>
>>>
>>>
>>> >
>>> > Thanks.
>>> >
>>> > -Ben
>>> >
>>> > _______________________________________________
>>> > OpenStack-dev mailing list
>>> > OpenStack-dev at lists.openstack.org
>>> > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>> >
>>
>>
>> _______________________________________________
>> OpenStack-dev mailing list
>> OpenStack-dev at lists.openstack.org
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev




More information about the OpenStack-dev mailing list