Skip to content
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

{envsitepackagesdir} doesn't substitute site-packages dir of tox's testenv #119

Closed
pytoxbot opened this issue Sep 17, 2016 · 4 comments
Closed

Comments

@pytoxbot
Copy link

Steps to reproduce

Create the following virtenv (==1.10.1)

virtualenv buggytox
buggytox/bin/pip install tox

The final virtenv should look like:

$ buggytox/bin/pip list
pip (1.4.1)
py (1.4.15)
setuptools (0.9.8)
tox (1.6.0)
virtualenv (1.10.1)
wsgiref (0.1.2)

Create a dummy project.

mkdir dummy
echo "from setuptools import setup, find_packages

setup(
    name="dummy",
    version="0.1",
    packages=find_packages(),
)" > dummy/setup.py

echo '[tox]
envlist = buggy

[testenv:buggy]
commands = python -c 'print {envsitepackagesdir}' > dummy/tox.ini

Run tox

cd dummy
tox

Expected

'.tox/buggytox/lib/python-xx/site-packages' is displayed

Actual

the 'buggytox/lib/python-xx/site-packages' is diplayed

Context

I came across this issue trying to have my tests run with py.tests. I opted having the tests included in the package and I was trying to follow manual instructions. I was expecting the {envsitepackagesdir} substitution will point to the [testenv:xx] site-packages dir. Infact I got the parent context site-packages dir which basically will render the method proposed in the forementioned link useless

The test code here for {envsitepackagesdir} subt is also quite generic, just checks a path containing 'site-packages' is obtained.

@pytoxbot
Copy link
Author

Original comment by @bhodorog

@hpk42 I've tried it with tox-1.6.1 installed from your dev index. Looks perfect.

@pytoxbot
Copy link
Author

Original comment by @bhodorog

Thx, I can see it was ... tough :). I'm angry I haven't look closer, I could have fix it myself .... next time maybe ;).

Sure I will. I'll let you know.

@pytoxbot
Copy link
Author

Original comment by @hpk42

Hi Bogdan,

i think i fixed this. Could you verify by installing from my
development index?

pip install -i http://devpi.net/hpk/dev/+simple/ -U tox

should give you a tox-1.6.1 release candidate which has the fix.

thanks,
holger

@pytoxbot
Copy link
Author

Original comment by @hpk42

fix issue119: sitepackagesdir now correctly points to virtualenv dir, not tox's own. also added a test to prevent regression.

→ <>

@tox-dev tox-dev locked and limited conversation to collaborators Jan 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant