Bug on running silver init for the second time.

Issue #1 on hold
Jorge Vargas
created an issue

I guess you closed the issues for the toppcloud repo to prevent duplication, so I'm posting this here again (because I have more/better info)

The bug is simple a symlink is getting in the way making the parent venv take the config from the new venv rendering all python commands unsuable due to changes to the distutils.cfg and distutils.init.py files.

I'm pretty sure the bug is in virtualenv-tip by now.

If you step with something like pdb the silver init command you will see that right after virtualenv is called the new venv has the following

{{{ (silver)elpargo@elpargo-linux:~/venvs/silver/src/silverlining/foobar/lib/python2.6$ ls -al distutils lrwxrwxrwx 1 elpargo elpargo 50 2010-03-06 01:33 distutils -> /home/elpargo/venvs/silver/lib/python2.6/distutils }}}

if you take a look at any other venv created with a released venv (I'm running 1.4.3)

you will see that distutils is a real folder and not a symlink.

So in conclusion silver isn't don't anything wrong virtualenv is to blame as it used to not symlink distutils and now it does causing this side effect.

Comments (4)

  1. Jorge Vargas reporter

    I can definitely confirm it's something with venv however I can't figure this out. If you run virtualenv from the CLI in the silver venv with python2.6 you end up with a symlinked distutils directory to the silver venv.

    If you run outside of it with the 1.4.3 virtualenv you get a real directory for distutils.

  2. Jorge Vargas reporter

    I pushed a hack in dab3107e2246 and 7acde593960e this will at least make it work. (I hope)

    One thing I realize is that the symlinks are getting created to the silver venv while in regular venvs they are created to the global site-packages. I'm 99% sure this is a side effect of installing venv in the silver venv.

    So perhaps the fix for this is to simply release the new virtualenv and get rid of that dependency. And bad enough it means all venvs created with silver are broken :(

  3. Log in to comment