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

Comments

@pytoxbot
Copy link

@pytoxbot pytoxbot commented Sep 17, 2016

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 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 obestwalter commented Mar 10, 2017

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

@pawelad
Copy link
Contributor

@pawelad pawelad commented Mar 18, 2017

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

@gaborbernat
Copy link
Member

@gaborbernat gaborbernat commented May 2, 2019

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

@gaborbernat gaborbernat closed this May 2, 2019
@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.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants