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/
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
cmdargs=[local('/Users/ronald/hg/tox/.tox/py27/bin/pip'), 'install', '--pre', '--cert={toxinidir}/my_ca_store.pem', 'pytest']
Downloading/unpacking pytest
  Could not fetch URL 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. Holger Krekel repo owner

    Indeed, the install command does not go through interpolation. Are you up for a PR to fix that?

  3. Ronald Evers reporter

    Will have a look. Is there a reason you guys are using "substition" everywhere instead of substitution other than "its shorter"?

  4. Holger Krekel repo owner

    no, feel free to make the systemic typo fix a first PR :) and thanks for looking into it.

  5. Log in to comment