diff --git a/requirements.txt b/requirements.txt index 3763b8fdea2..377322bed8c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,3 +3,7 @@ aexpect>=1.3.1 simplejson>=3.5.3 netaddr>=0.7.18 netifaces>=0.10.5 +# This is a mandatory requirement but on 36.0 release the avocado name was +# avocado-36.0 which breaks the dependencies. Please include this dependency +# manually. +# avocado-framework>=36.0 diff --git a/setup.py b/setup.py index 91ed33b835c..1f0d78cb3e3 100644 --- a/setup.py +++ b/setup.py @@ -80,6 +80,23 @@ def pre_post_plugin_type(): if __name__ == "__main__": + requirements = ["netifaces", "aexpect", "netaddr", "simplejson", + "autotest"] + try: + # Avocado-36 was called "avocado" and newer ones are called + # avocado-framework. Let's only include it in case it's not + # available. + from avocado import Test + del(Test) + except ImportError: + if sys.version_info[:2] >= (2, 7): + requirements.append("avocado-framework>=36.0") + else: + # In avocado-36 there is a bug which requires the stevedore + # to be manually added. + requirements.append("stevedore>=1.8.0,<=1.10.0") + requirements.append("avocado-framework>=36.0,<=46.0") + setup(name='avocado-plugins-vt', version=VERSION, description='Avocado Virt Test Compatibility Layer plugin', @@ -114,4 +131,5 @@ def pre_post_plugin_type(): 'vt-joblock = avocado_vt.plugins.vt_joblock:VTJobLock', ], }, + install_requires=requirements, )