install_command doesnt interpolate {toxinidir}

Issue #128 on hold
Ronald Evers
created an issue

I'm running into a wall trying to make pip use a custom ssl ca bundle with tox. I ended up trying to customize the install_command like so:

install_command=pip install --pre --cert={toxinidir}/my_ca_store.pem {opts} {packages}

But it appears tox is not interpolating the {toxinidir} construct in there and is just the command with "--cert={toxinidir}" in the command literally. See the output below. Am I missing something or is this a bug? By the way, it does work when I use an explicit and absolute path like so: "--cert=/Users/ronald/.../my_ca_store.pem".

(scratch)[ronald@thing] ~/hg/tox # tox
GLOB sdist-make: /Users/ronald/hg/tox/setup.py
py27 create: /Users/ronald/hg/tox/.tox/py27
py27 installdeps: pytest
ERROR: invocation failed, logfile: /Users/ronald/hg/tox/.tox/py27/log/py27-1.log
ERROR: actionid=py27
msg=getenv
cmdargs=[local('/Users/ronald/hg/tox/.tox/py27/bin/pip'), 'install', '--pre', '--cert={toxinidir}/my_ca_store.pem', 'pytest']
env={<cut>}
Downloading/unpacking pytest
  Could not fetch URL https://pypi.python.org/simple/pytest/: There was a problem confirming the ssl certificate: <urlopen error [Errno 185090050] _ssl.c:340: error:0B084002:x509 certificate routines:X509_load_cert_crl_file:system lib>

As you can see, it does interpolate the "{packages}" but not the "{toxinidir}".

Comments (7)

  1. Ronald Evers reporter

    Just to make sure I tested using {toxinidir} in a different place in the ini-file. I can confirm that it does work in a

    commands = echo {toxinidir}
    

    and also in a:

    commands = echo x{toxinidir}y
    
  2. Log in to comment