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

tox fails when ":" is in the current directory path #203

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

tox fails when ":" is in the current directory path #203

pytoxbot opened this issue Sep 17, 2016 · 4 comments
Labels
area:testenv-creation bug:upstream something does not behave as it should, but can't or shouldn't be fixed in tox, but in a dependency

Comments

@pytoxbot
Copy link

This is on linux. Trying to execute tox when the path contains a ":" doesn't work:

$ pwd
/home/tom/devel/bla:blub/tox
tom@basilikum:~/devel/bla:blub/tox$ tox
GLOB sdist-make: /home/tom/devel/bla:blub/tox/setup.py
Traceback (most recent call last):
  File "/usr/bin/tox", line 9, in <module>
    load_entry_point('tox==1.7.2', 'console_scripts', 'tox-2.7')()
  File "/usr/lib/python2.7/site-packages/tox/_cmdline.py", line 26, in main
    retcode = Session(config).runcommand()
  File "/usr/lib/python2.7/site-packages/tox/_cmdline.py", line 310, in runcommand
    return self.subcommand_test()
  File "/usr/lib/python2.7/site-packages/tox/_cmdline.py", line 448, in subcommand_test
    if self.setupenv(venv):
  File "/usr/lib/python2.7/site-packages/tox/_cmdline.py", line 377, in setupenv
    envlog.set_python_info(commandpath)
  File "/usr/lib/python2.7/site-packages/tox/result.py", line 47, in set_python_info
    "import sys; "
  File "/usr/lib/python2.7/site-packages/py/_path/local.py", line 695, in sysexec
    stdout, stderr,)
py.process.cmdexec.Error: ExecutionFailed: 1  /home/tom/devel/bla:blub/tox/.tox/py27/bin/python
ImportError: No module named site

Moving the same code to another directory and executing tox works fine.

@obestwalter obestwalter added the bug label Dec 4, 2016
@obestwalter
Copy link
Member

obestwalter commented Dec 4, 2016

There is still a problem, but it's different now:

setup.py:

from setuptools import setup
setup(name='dummy-setup')

tox.ini:

[tox]
envlist = py27

[testenv]
commands = pip --version

results in:

[....]
ImportError: No module named site
New python executable in /home/oliver/work/tox/tests/bla:blub/.tox/py27/bin/python2.7
Also creating executable in /home/oliver/work/tox/tests/bla:blub/.tox/py27/bin/python
ERROR: The executable /home/oliver/work/tox/tests/bla:blub/.tox/py27/bin/python2.7 is not functioning
ERROR: It thinks sys.prefix is u'/home/oliver/work/tox/tests/bla:blub/.tox' (should be u'/home/oliver/work/tox/tests/bla:blub/.tox/py27')
ERROR: virtualenv is not compatible with this system or executable
Running virtualenv with interpreter /opt/pyenv/shims/python2.7

@obestwalter obestwalter changed the title tox failes when ":" is in the current directory path tox fails when ":" is in the current directory path Dec 4, 2016
@obestwalter
Copy link
Member

obestwalter commented Mar 10, 2017

Might be a good idea to tackle this together with #121 and #291.

@pawelad
Copy link

pawelad commented Mar 18, 2017

I could reproduce it but I believe this is an upstream issue: pypa/virtualenv#395

@obestwalter obestwalter added bug:upstream something does not behave as it should, but can't or shouldn't be fixed in tox, but in a dependency and removed bug labels Jul 16, 2017
@gaborbernat
Copy link
Member

Due to lack of activity on this issue, for now, we'll close this issue.

@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
area:testenv-creation bug:upstream something does not behave as it should, but can't or shouldn't be fixed in tox, but in a dependency
Projects
None yet
Development

No branches or pull requests

4 participants