[Avocado-devel] installation to a virtualenv

Lukáš Doktor ldoktor at redhat.com
Thu Jul 26 14:48:11 UTC 2018


Dne 24.7.2018 v 20:04 Sergey Bronnikov napsal(a):
> 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.
> 

Dear Sergey,

it is popular and widely used, but unfortunately still a bit hackish in terms of configuration files. You don't need to change the DESTDIR as setuptools detect you're in virtualenv and put the files into the right location. The only missing piece here is hardcoded `/etc` configuration which I'm working on now (and neglecting for a while already).

So as Cleber wrote, just install avocado, then `pip install .` and if you need to adjust `vt.conf` please copy `avocado-vt/etc/avocado/conf.d` files it into `/etc/avocado/conf.d/` until we resolve the https://trello.com/c/NxqPTjh2/1118-avocadovt-add-avocado-and-other-requirements

Lukáš

PS: When https://trello.com/c/NxqPTjh2/1118-avocadovt-add-avocado-and-other-requirements is resolved the only step should be `pip install git+http://github.com/avocado-framework/avocado-vt@master` which will take care of all the deps. But there is still the `etc` config to take care of...

> Sergey
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/avocado-devel/attachments/20180726/00d6371c/attachment.sig>


More information about the Avocado-devel mailing list