(Python虚拟测试环境)doc openstack

时间:2017-08-05 23:57:07

标签: python cloud tox

murano install

您好

我试图在开源云解决方案上部署Murano(应用程序目录...):Openstack

我对使用tox有疑问。每次使用这个工具我都有同样的错误:

错误:无法安装deps [-r / home / login / murano / murano / requirements.txt,-r / home / login Bin / pip install -chttps://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt 见/ login / murano / murano / .tox / venv / log / venv-1.log)',1)

代替登录是我在Ubuntu上使用的名称

感谢您的帮助

enter image description here

1 个答案:

答案 0 :(得分:0)

我使用的是Ubuntu Server,因此我无法复制/粘贴:我使用的是usb磁盘。 首先,.tox中没有venv目录:我认为它在运行时就会生成。 的 requirements.txt

# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
pbr!=2.1.0,>=2.0.0 # Apache-2.0
Babel!=2.4.0,>=2.3.4 # BSD
SQLAlchemy!=1.1.5,!=1.1.6,!=1.1.7,!=1.1.8,>=1.0.10 # MIT
stevedore>=1.20.0 # Apache-2.0
alembic>=0.8.10 # MIT
eventlet!=0.18.3,!=0.20.1,<0.21.0,>=0.18.2 # MIT
PasteDeploy>=1.5.0 # MIT
Routes>=2.3.1 # MIT
tenacity>=3.2.1 # Apache-2.0
WebOb>=1.7.1 # MIT
kombu!=4.0.2,>=4.0.0 # BSD
psutil>=3.2.2 # BSD
six>=1.9.0 # MIT
netaddr!=0.7.16,>=0.7.13 # BSD
PyYAML>=3.10.0 # MIT
jsonpatch>=1.1 # BSD
keystoneauth1>=3.1.0 # Apache-2.0
keystonemiddleware>=4.12.0 # Apache-2.0
testtools>=1.4.0 # MIT
yaql>=1.1.0 # Apache 2.0 License
debtcollector>=1.2.0 # Apache-2.0

# For paste.util.template used in keystone.common.template
Paste # MIT

jsonschema!=2.5.0,<3.0.0,>=2.0.0 # MIT
python-keystoneclient>=3.8.0 # Apache-2.0
python-heatclient>=1.6.1 # Apache-2.0
python-neutronclient>=6.3.0 # Apache-2.0
python-muranoclient>=0.8.2 # Apache-2.0
python-congressclient<2000,>=1.3.0 # Apache-2.0
python-mistralclient>=3.1.0 # Apache-2.0
oslo.db>=4.24.0 # Apache-2.0
oslo.config!=4.3.0,!=4.4.0,>=4.0.0 # Apache-2.0
oslo.concurrency>=3.8.0 # Apache-2.0
oslo.context>=2.14.0 # Apache-2.0
oslo.policy>=1.23.0 # Apache-2.0
oslo.messaging!=5.25.0,>=5.24.2 # Apache-2.0
oslo.middleware>=3.27.0 # Apache-2.0
oslo.serialization!=2.19.1,>=1.10.0 # Apache-2.0
oslo.service>=1.10.0 # Apache-2.0
oslo.utils>=3.20.0 # Apache-2.0
oslo.i18n!=3.15.2,>=2.1.0 # Apache-2.0
oslo.log>=3.22.0 # Apache-2.0
semantic-version>=2.3.1 # BSD
castellan>=0.7.0 # Apache-2.0

<强> tox.ini

[tox]
envlist = py35,py27,pep8
minversion = 1.8
skipsdist = True

[testenv]
usedevelop = True
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
setenv =
    VIRTUAL_ENV={envdir}
    DISCOVER_DIRECTORY=murano/tests/unit
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
deps = -r{toxinidir}/requirements.txt
       -r{toxinidir}/test-requirements.txt
commands = rm -f .testrepository/times.dbm
           bash tools/pretty_tox.sh '{posargs}'
whitelist_externals = bash
                      find
                      rm
                      bandit

[testenv:py27-ocata]
install_command = pip install -chttps://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/ocata {opts} {packages}

[testenv:murano-test-runner]
commands = murano-test-runner {posargs}

[testenv:pep8]
commands =
    flake8 {posargs}
    {[testenv:bandit]commands}

[testenv:bandit]
commands = bandit -c bandit.yaml -r murano -x tests -n 5 -ll

[testenv:venv]
commands = {posargs}

[testenv:cover]
commands = {toxinidir}/tools/cover.sh {posargs}

[testenv:debug]
commands =
  find . -type f -name "*.pyc" -delete
  oslo_debug_helper {posargs}

[testenv:docs]
commands = python setup.py build_sphinx

[testenv:murano-firstapp]
commands = sphinx-build -E -W -d doc/build/murano-firstapp/doctrees -b html doc/source/first-app/source doc/build/murano-firstapp/html

[testenv:pyflakes]
deps = flake8
commands = flake8

[testenv:pylint]
setenv = VIRTUAL_ENV={envdir}
commands = bash tools/lintstack.sh

[testenv:genconfig]
commands =
    oslo-config-generator --config-file etc/oslo-config-generator/murano.conf

[testenv:gencfconfig]
commands =
    oslo-config-generator --config-file etc/oslo-config-generator/murano-cfapi.conf

[testenv:genpolicy]
commands = oslopolicy-sample-generator --config-file etc/oslo-policy-generator/murano-policy-generator.conf

[testenv:releasenotes]
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html

[testenv:api-ref]
# This environment is called from CI scripts to test and publish
# the API Ref to developer.openstack.org.
commands =
  rm -rf api-ref/build
  sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
whitelist_externals = rm

[flake8]
show-source = true
builtins = _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build

[hacking]
local-check-factory = murano.hacking.checks.factory
import_exceptions = oslo.db.sqlalchemy.test_base,
                    murano.common.i18n

<强> .tox / genconfig /日志/ genconfig-0.log

actionid: genconfig
msg: getenv
cmdargs: ['/usr/bin/python3', '-m', 'virtualenv', '--python', '/usr/bin/python3', 'genconfig']
env: {'DISCOVER_DIRECTORY': 'murano/tests/unit', 'SUDO_UID': '1000', 'LANG': 'en_US.UTF-8', 'USERNAME': 'root', 'TERM': 'linux', 'MAIL': '/var/mail/root', 'PYTHONHASHSEED': '2254782651', 'LANGUAGE': 'en_US:', 'SUDO_USER': 'yassine', 'SHELL': '/bin/bash', 'SUDO_GID': '1000', 'VIRTUAL_ENV': '/home/yassine/murano/murano/.tox/genconfig', 'LS_COLORS': 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:', 'SUDO_COMMAND': '/usr/bin/tox -e genconfig', 'PATH': '/home/yassine/murano/murano/.tox/genconfig/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin', 'HOME': '/home/yassine', 'USER': 'root', 'LOGNAME': 'root'}

Already using interpreter /usr/bin/python3
Using base prefix '/usr'
New python executable in /home/yassine/murano/murano/.tox/genconfig/bin/python3
Also creating executable in /home/yassine/murano/murano/.tox/genconfig/bin/python
Installing setuptools, pkg_resources, pip, wheel...done.

还有一个很长的日志文件:.tox / genconfig / log / genconfig-1.log