Skip to content

Commit

Permalink
requirements: Add all mandatory requirements
Browse files Browse the repository at this point in the history
The requirements are quite outdated, this commit adds all of them to
both, requirements.txt and setup.py in order to just install avocado-vt
and get all required dependencies installed automatically.

The `avocado-framework` dependency is not included in requirements.txt
as 36lts used a different name. This is treated in setup.py but there is
no way to workaround it in requirements so only comment is there.

Signed-off-by: Lukáš Doktor <[email protected]>
  • Loading branch information
ldoktor committed Sep 12, 2017
1 parent 2bb6acc commit 00d281d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
4 changes: 4 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
17 changes: 17 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,22 @@ 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
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',
Expand Down Expand Up @@ -114,4 +130,5 @@ def pre_post_plugin_type():
'vt-joblock = avocado_vt.plugins.vt_joblock:VTJobLock',
],
},
install_requires=requirements,
)

0 comments on commit 00d281d

Please sign in to comment.