Stopped working on python3 #358

Closed
adamiak opened this Issue Nov 22, 2012 · 8 comments

Comments

Projects
None yet
5 participants

adamiak commented Nov 22, 2012

Stopped working for Python-3.3.0 a day ago. Looks like a problem with embedded 'distribute'. Older versions of virtualenv work fine. Traceback:

somename@myhost:~/workspace/somename$ /home/somename/opt/Python-3.3.0/bin/python3 ./virtualenv.py --no-site-packages env_somename
Using base prefix '/home/somename/opt/Python-3.3.0'
New python executable in env_somename/bin/python3
Also creating executable in env_somename/bin/python
Installing distribute......
  Complete output from command /home/somename/works...somename/bin/python3 -c "#!python
\"\"\"Bootstra...   sys.exit(main())
" --always-copy -U distribute:
  Usage: -c [options]

-c: error: no such option: --always-copy
----------------------------------------
...Installing distribute...done.
Traceback (most recent call last):
  File "./virtualenv.py", line 2557, in <module>
    main()
  File "./virtualenv.py", line 961, in main
    never_download=options.never_download)
  File "./virtualenv.py", line 1068, in create_environment
    search_dirs=search_dirs, never_download=never_download)
  File "./virtualenv.py", line 613, in install_distribute
    search_dirs=search_dirs, never_download=never_download)
  File "./virtualenv.py", line 580, in _install_req
    cwd=cwd)
  File "./virtualenv.py", line 1039, in call_subprocess
    % (cmd_desc, proc.returncode))
OSError: Command /home/somename/works...somename/bin/python3 -c "#!python
\"\"\"Bootstra...   sys.exit(main())
" --always-copy -U distribute failed with error code 2
Contributor

pnasrat commented Nov 22, 2012

Does develop branch work for you?

adamiak commented Nov 22, 2012

No. Both master and develop branches fail the same way.

adamiak commented Nov 22, 2012

Actually virtualenv.py file is the same in master and develop branches (md5s match).

Contributor

jezdez commented Nov 23, 2012

@adamiak yeah, master and develop are the same since we just released 1.8.3 merging develop into master.

I can't reproduce this error though, on Mac OS at least. While I am able to reproduce #359.

jheino commented Nov 23, 2012

Also broken for me on a fresh installation of Debian Squeeze with Python 2.6.6:

jheino@localhost:~$ curl -O https://raw.github.com/pypa/virtualenv/master/virtualenv.py
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  111k  100  111k    0     0  83572      0  0:00:01  0:00:01 --:--:-- 96610
jheino@localhost:~$ md5sum virtualenv.py
9c074fa84daef13f13fbedeef056a9d5  virtualenv.py
jheino@localhost:~$ python virtualenv.py --distribute ~
New python executable in /home/jheino/bin/python
Installing distribute......
  Complete output from command /home/jheino/bin/python -c "#!python
\"\"\"Bootstra...   sys.exit(main())
" --always-copy -U distribute:
  Usage: -c [options]

-c: error: no such option: --always-copy
----------------------------------------
...Installing distribute...done.
Traceback (most recent call last):
  File "virtualenv.py", line 2557, in <module>
    main()
  File "virtualenv.py", line 961, in main
    never_download=options.never_download)
  File "virtualenv.py", line 1068, in create_environment
    search_dirs=search_dirs, never_download=never_download)
  File "virtualenv.py", line 613, in install_distribute
    search_dirs=search_dirs, never_download=never_download)
  File "virtualenv.py", line 580, in _install_req
    cwd=cwd)
  File "virtualenv.py", line 1039, in call_subprocess
    % (cmd_desc, proc.returncode))
OSError: Command /home/jheino/bin/python -c "#!python
\"\"\"Bootstra...   sys.exit(main())
" --always-copy -U distribute failed with error code 2
jheino@localhost:~$ python -V
Python 2.6.6
Contributor

pnasrat commented Nov 23, 2012

@g2p this is possibly due to 0c78077

Contributor

g2p commented Nov 23, 2012

Yes it's related, I missed some code paths when removing unexpected arguments that the new distribute doesn't ignore.
Whether to pass --always-copy should be decided when bootstrap_script is set earlier in the function, and I don't think there's a need to make it conditional on finding a local tgz.
I'll try to extend the coverage of the functional tests to make sure all branches are tested.

Contributor

g2p commented Nov 23, 2012

d36f237a03a8a28e5dad11357d78a9830e924e32 should have the correct logic (confirmed by nuking virtualenv_support), I'll work on the tests.

pnasrat closed this in a7887f0 Nov 23, 2012

@pnasrat pnasrat added a commit that referenced this issue Nov 23, 2012

@pnasrat pnasrat Merge pull request #360 from g2p/develop
Increase coverage, refactor cli-building, close #358
3bc3762
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment