New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install_command doesnt interpolate {toxinidir} #128

Closed
pytoxbot opened this Issue Sep 17, 2016 · 5 comments

Comments

Projects
None yet
1 participant
@pytoxbot

pytoxbot commented Sep 17, 2016

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".

#!python

(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}".

@pytoxbot

This comment has been minimized.

pytoxbot commented Sep 17, 2016

Original comment by @hpk42

fix issue128: enable full substitution in install_command,
thanks for the PR to Ronald Evers

→ <>

@pytoxbot pytoxbot closed this Sep 17, 2016

@pytoxbot

This comment has been minimized.

pytoxbot commented Sep 17, 2016

Original comment by @hpk42

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

@pytoxbot

This comment has been minimized.

pytoxbot commented Sep 17, 2016

Original comment by evers

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

@pytoxbot

This comment has been minimized.

pytoxbot commented Sep 17, 2016

Original comment by @hpk42

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

@pytoxbot

This comment has been minimized.

pytoxbot commented Sep 17, 2016

Original comment by evers

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment