tox checks wrong paths when updating setuptools dependencies

Issue #147 on hold
Mikhail Korobov created an issue

Hi,

Tox stopped worked for me for py3 environment; it seems that during package installation pip "sees" packages installed for system interpreter and refuses to install them:

(scraping)kmike ~/svn/django-webtest [master]> tox -e py33 -r -v
using tox.ini: /Users/kmike/svn/django-webtest/tox.ini
using tox-1.6.1 from /Users/kmike/envs/scraping/lib/python2.7/site-packages/tox/__init__.pyc
GLOB sdist-make: /Users/kmike/svn/django-webtest/setup.py
  /Users/kmike/svn/django-webtest$ /Users/kmike/envs/scraping/bin/python2.7 /Users/kmike/svn/django-webtest/setup.py sdist --formats=zip --dist-dir /Users/kmike/svn/django-webtest/.tox/dist >/Users/kmike/svn/django-webtest/.tox/log/tox-0.log
py33 recreate: /Users/kmike/svn/django-webtest/.tox/py33
  /Users/kmike/svn/django-webtest/.tox$ /usr/local/bin/python3.3 /Users/kmike/envs/scraping/lib/python2.7/site-packages/virtualenv.py --setuptools --python /usr/local/bin/python3.3 py33 >/Users/kmike/svn/django-webtest/.tox/py33/log/py33-0.log
py33 installdeps: WebTest, django
  /Users/kmike/svn/django-webtest$ /Users/kmike/svn/django-webtest/.tox/py33/bin/pip install --pre WebTest django >/Users/kmike/svn/django-webtest/.tox/py33/log/py33-1.log
py33 inst: /Users/kmike/svn/django-webtest/.tox/dist/django-webtest-1.7.6.zip
  /Users/kmike/svn/django-webtest$ /Users/kmike/svn/django-webtest/.tox/py33/bin/pip install --pre /Users/kmike/svn/django-webtest/.tox/dist/django-webtest-1.7.6.zip >/Users/kmike/svn/django-webtest/.tox/py33/log/py33-2.log
py33 runtests: commands[0] | python django_webtest_tests/runtests.py
  /Users/kmike/svn/django-webtest$ /Users/kmike/svn/django-webtest/.tox/py33/bin/python django_webtest_tests/runtests.py 
Traceback (most recent call last):
  File "django_webtest_tests/runtests.py", line 8, in <module>
    from django.core.management import execute_from_command_line
ImportError: No module named 'django'

This is the pip log - requirements are not installed because pip/setuptools checks wrong paths for some reason:

(scraping)kmike ~/svn/django-webtest [master]> cat /Users/kmike/svn/django-webtest/.tox/py33/log/py33-1.log
actionid=py33
msg=getenv
cmdargs=[local('/Users/kmike/svn/django-webtest/.tox/py33/bin/pip'), 'install', '--pre', 'WebTest', 'django']
env={'PYTHONIOENCODING': 'utf_8', 'PROJECT_HOME': '/Users/kmike/dev', 'VCPROMPT_FORMAT': '[%b%m%u]', 'TERM_PROGRAM_VERSION': '326', 'TMPDIR': '/var/folders/_5/cbsg50991szfp1r9nwxpx8580000gq/T/', 'LOGNAME': 'kmike', 'USER': 'kmike', 'HOME': '/Users/kmike', 'PATH': '/Users/kmike/svn/django-webtest/.tox/py33/bin:/Users/kmike/envs/scraping/bin:/Users/kmike/.pythonbrew/bin:/Users/kmike/.pythonbrew/bin:/usr/local/bin:/usr/local/share/python:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin', 'PS1': '(scraping)\\[$grey\\]\\u \\[$reset\\]\\w \\[$green\\]$(vcprompt)\\[$reset\\]> ', 'DISPLAY': '/tmp/launch-zsNURS/org.macosforge.xquartz:0', 'TERM_PROGRAM': 'Apple_Terminal', 'LANG': 'en_US.UTF-8', 'TERM': 'xterm-256color', 'SHELL': '/bin/bash', 'SHLVL': '1', 'SECURITYSESSIONID': '186a4', 'TEAMLOCAL_DEBUG': '1', 'SHIFTGIG_DEBUG': '1', 'EDITOR': 'nano', 'PYTHONPATH': '', 'WORKON_HOME': '/Users/kmike/envs', 'TERM_SESSION_ID': '8B065A87-6502-4A5D-AC77-A10654713D5A', 'CC': 'clang', 'FFLAGS': '-ff2c', 'SSH_AUTH_SOCK': '/tmp/launch-GaV36y/Listeners', 'FAB_COMPLETION_CACHE_TASKS': 'true', 'Apple_PubSub_Socket_Render': '/tmp/launch-P6ElIR/Render', '_': '/Users/kmike/envs/scraping/bin/tox', 'VIRTUALENVWRAPPER_PROJECT_FILENAME': '.project', 'VIRTUAL_ENV': '/Users/kmike/envs/scraping', 'VIRTUALENVWRAPPER_HOOK_DIR': '/Users/kmike/envs', 'CXX': 'clang++', 'OLDPWD': '/Users/kmike/svn/nltk', 'FAB_COMPLETION_CACHED_TASKS_FILENAME': '.fab_tasks~', '__CF_USER_TEXT_ENCODING': '0x1F7:0:0', 'PWD': '/Users/kmike/svn/django-webtest', 'PIP_DOWNLOAD_CACHE': '/Users/kmike/.pip/download', '__CHECKFIX1436934': '1'}
Requirement already satisfied (use --upgrade to upgrade): WebTest in /usr/local/lib/python3.3/site-packages
Requirement already satisfied (use --upgrade to upgrade): django in /usr/local/lib/python3.3/site-packages
Requirement already satisfied (use --upgrade to upgrade): six in /usr/local/lib/python3.3/site-packages (from WebTest)
Requirement already satisfied (use --upgrade to upgrade): WebOb>=1.2 in /usr/local/lib/python3.3/site-packages (from WebTest)
Requirement already satisfied (use --upgrade to upgrade): waitress>=0.8.5 in /usr/local/lib/python3.3/site-packages (from WebTest)
Requirement already satisfied (use --upgrade to upgrade): beautifulsoup4 in /usr/local/lib/python3.3/site-packages (from WebTest)
Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/local/lib/python3.3/site-packages/setuptools-1.3.2-py3.3.egg (from waitress>=0.8.5->WebTest)
Cleaning up...

This is the contents of pip script:

(scraping)kmike ~/svn/django-webtest [master]> cat /Users/kmike/svn/django-webtest/.tox/py33/bin/pip
#!/usr/local/bin/python3.3

# -*- coding: utf-8 -*-
import re
import sys

from pip import main

if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
    sys.exit(main())

I'm using tox 1.6.1, pip 1.5 and virtualenv 1.11

Comments (3)

  1. Log in to comment