[openstack-dev] [glance] Removing python-swiftclient from requirements.txt

Robert Collins robertc at robertcollins.net
Wed Jul 29 21:52:13 UTC 2015


On 30 July 2015 at 09:38, Ian Cordasco <ian.cordasco at rackspace.com> wrote:
>
>
> On 7/29/15, 13:27, "William M Edmonds" <edmondsw at us.ibm.com> wrote:
>
>>
>>> From: Doug Hellmann <doug at doughellmann.com>
>>> To: openstack-dev <openstack-dev at lists.openstack.org>
>>> Date: 07/28/2015 07:59 PM
>>> Subject: Re: [openstack-dev] [glance] Removing python-swiftclient
>>
>>> from requirements.txt
>>>
>>
>><snip>
>>
>>> I replied on both patches, but I'll repeat it here for a broader
>>> audience:
>>>
>>> Please set up an "extras" entry for each backend instead of just
>>> removing the dependencies.  That will signal to users that you know
>>> what dependencies there are for a backend, but that they are optional,
>>> and still allow someone to do the equivalent of "pip install
>>> glance[vmware]" or "pip install glance[swift]" to get those
>>> dependencies.  Nova and oslo.versionedobjects have examples in their
>>> setup.cfg if you need a template.
>>>
>>> I didn't mention in the reviews, but this will also make integration
>>> tests in our gate easier, since you can put ".[vmware]" or ".[swift]" in
>>> the tox.ini to pull in those dependencies.
>>>
>>> Doug
>>>
>>
>><snip>
>>
>>I did this... but now I'm thinking I really shouldn't have. That makes
>>perfect sense for glance_store, but shouldn't that only be in
>>glance_store, and not also in glance?
>
> No, I think it belongs in glance too frankly. What most people care about
> is that Glance works with VMWare and Swift, not that they install glance
> and some library that interacts with those. For most people their concept
> of how glance works is that it talks to VMWare, Swift, etc. It makes
> sense, then (to not cause too much confusion) for Glance to set-up extras
> that merely then define glance_store[swift] or what have you.
>
> I'm willing to be convinced otherwise.
>
> Also, I haven't tested how something like
>
> $ pip install glance[swift,vmware]
>
> Would behave given we'll need glance_store in our requires no matter what,
> and then with the extras it'll be installing
>
> $ glance_store[swift] glance_store[vmware]
>
> I'll have to test this a bit. It may make more sense to simply have these
> be Glance dependencies since we're the only consumer of glance_store (for
> now).

If pip doesn't merge the transitive extras then I know exactly where
to fix it so it does, and we've multiple folk working fulltime around
this space who can make it happen. Please do test: pip install
glance[swift,vmware] should resolve to glance_store[swift,vmware]
sanely, and that will bring in all the child deps happily.

AFAIAA it all works now - and if it doesn't fixing it will be
interrupt priority.

-Rob


-- 
Robert Collins <rbtcollins at hp.com>
Distinguished Technologist
HP Converged Cloud



More information about the OpenStack-dev mailing list