[Avocado-devel] installation to a virtualenv

Cleber Rosa crosa at redhat.com
Wed Jul 25 20:11:33 UTC 2018



On 07/24/2018 02:04 PM, Sergey Bronnikov wrote:
> Hello!                                             
>             
> Avocado documentation describes installation from source code
> to the whole system. I don't want to pollute system and use
> separate virtual environment. In that case everything works fine
> except tests discovering - command 'avocado list' reports nothing.
>            
> My actions step by step:
> (note: I am using vanilla avocado and customized avocado-vt, so
> avocado-vt is
> installed from source code not via pip)
> 
> - virtualenv venv
> - source
> venv/bin/activate                                                   
> - pip install -r requirements.txt      
> - git clone https://github.com/avocado-framework/avocado-vt
> - reset to 59.0 release: git reset --hard
> fc84a49f20698126a4f283e89cff227a84abeb71
> - sed -i -e 's/DESTDIR=/DESTDIR?=/g' avocado-vt/Makefile                 
> - DESTDIR=venv make -C avocado-vt install link
> - avocado vt-bootstrap
> - avocado list
> 
> where requirements.txt is:
> $ cat requirements.txt
> aexpect==1.5.1
> autotest==0.16.4
> avocado-framework==63.0
> avocado-framework-plugin-varianter-yaml-to-mux==63.0
> enum34==1.1.6
> netaddr==0.7.19
> netifaces==0.10.7
> pbr==4.2.0
> pkg-resources==0.0.0
> PyYAML==3.13
> six==1.11.0
> stevedore==1.29.0
> subprocess32==3.5.2
> 
> 
> As I understand correctly installation to a separate virtualenv is not
> popular
> usecase but perhaps someone can help me.
> 
> Sergey
> 

Hi Sergey,

IIUC, you're installing Avocado via pip, right?  And then Avocado-VT
from source, correct?

This should be possible, and I've verified it works.  The basic steps I
followed:

 python -m virtualenv /tmp/foo
 . /tmp/foo/bin/activate
 pip install avocado-framework
 cd /path/to/my/avocado-vt
 pip install -r requirements.txt
 pip install .
 avocado vt-bootstrap
 avocado list

I've posted the logs output here:

 https://paste.fedoraproject.org/paste/BPuTNBpW7JBn00aggoeGIQ

Regards.

-- 
Cleber Rosa
[ Sr Software Engineer - Virtualization Team - Red Hat ]
[ Avocado Test Framework - avocado-framework.github.io ]
[  7ABB 96EB 8B46 B94D 5E0F  E9BB 657E 8D33 A5F2 09F3  ]




More information about the Avocado-devel mailing list