On Wed, Apr 11, 2018, at 3:09 PM, Michael Still wrote:
> Hi,
> https://review.openstack.org/#/c/523387 proposes adding a z/VM specific
> dependancy to nova's requirements.txt. When I objected the counter argument
> is that we have examples of windows specific dependancies (os-win) and
> powervm specific dependancies in that file already.
> I think perhaps all three are a mistake and should be removed.
> My recollection is that for drivers like ironic which may not be deployed
> by everyone, we have the dependancy documented, and then loaded at runtime
> by the driver itself instead of adding it to requirements.txt. This is to
> stop pip for auto-installing the dependancy for anyone who wants to run
> nova. I had assumed this was at the request of the deployer community.
> So what do we do with z/VM? Do we clean this up? Or do we now allow
> dependancies that are only useful to a very small number of deployments
> into requirements.txt?
> Michael

I think there are two somewhat related issues here. The first is being able to 
have platform specific dependencies so that nova can run on say python2 and 
python3 or linux and windows using the same requirements list. To address this 
you should use environment markers [0] to specify when a specific environment 
needs additional or different packages to function and those should probably 
all just go into requirements.txt.

The second issue is enabling optional functionality that a default install 
shouldn't reasonably have to worry about (and is install platform independent). 
For this you can use setuptools extras[1]. For an example of how this is used 
along with setup.cfg and PBR you can look at swiftclient. Then users that know 
they want the extra features will execute something like `pip install 

[0] https://www.python.org/dev/peps/pep-0496/

Hope this helps,

OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe

Reply via email to