Issue #14 new

gp.recipe.pip doesn't work with Windows XP

Hansa
created an issue

I've experienced a problem in gp.recipe.pip that prevents it from installing pip.

My buildout.cfg looks like this: {{{

!python

[buildout] parts = pip download-cache = download

[pip] recipe = gp.recipe.pip }}}

and when I try to buildout it with an fresh install of Python 2.6 i get the following error: {{{

!python

Installing pip. New python executable in C:\workspace\django_app\parts\pip\Scripts\python.exe 'import site' failed; use -v for traceback Installing distribute....... Complete output from command C:\workspace\django_app\parts...n.exe -c "#!python \"\"\"Bootstrap distribu...1:]) " --always-copy -U distribute: 'import site' failed; use -v for traceback Traceback (most recent call last): File "<string>", line 20, in <module> ImportError: No module named tempfile


...Installing distribute...done. While: Installing pip.

An internal error occurred due to a bug in either zc.buildout or in a recipe being used: Traceback (most recent call last): File "c:\workspace\django_app\eggs\zc.buildout-1.5.1-py2.6.egg\zc\buildout\buildout.py", line 1784, in main getattr(buildout, command)(args) File "c:\workspace\django_app\eggs\zc.buildout-1.5.1-py2.6.egg\zc\buildout\buildout.py", line 569, in install installed_files = self[part]._call(recipe.install) File "c:\workspace\django_app\eggs\zc.buildout-1.5.1-py2.6.egg\zc\buildout\buildout.py", line 1276, in _call return f() File "c:\workspace\django_app\eggs\gp.recipe.pip-0.5.2-py2.6.egg\gp\recipe\pip__init.py", line 211, in install return Scripts.install(self) File "c:\workspace\django_app\eggs\zc.recipe.egg-1.3.2-py2.6.egg\zc\recipe\egg\egg.py", line 145, in install reqs, ws = self.working_set() File "c:\workspace\django_app\eggs\gp.recipe.pip-0.5.2-py2.6.egg\gp\recipe\pip__init.py", line 147, in working_set use_distribute=True) File "c:\workspace\django_app\eggs\virtualenv-1.4.9-py2.6.egg\virtualenv.py", line 614, in create_environment install_distribute(py_executable, unzip=unzip_setuptools) File "c:\workspace\django_app\eggs\virtualenv-1.4.9-py2.6.egg\virtualenv.py", line 364, in install_distribute _install_req(py_executable, unzip, distribute=True) File "c:\workspace\django_app\eggs\virtualenv-1.4.9-py2.6.egg\virtualenv.py", line 337, in _install_req cwd=cwd) File "c:\workspace\django_app\eggs\virtualenv-1.4.9-py2.6.egg\virtualenv.py", line 587, in call_subprocess % (cmd_desc, proc.returncode)) OSError: Command C:\workspace\django_app\parts...n.exe -c "#!python \"\"\"Bootstrap distribu...1:]) " --always-copy -U distribute failed with error code 1 }}}

and if i run it again, i get this message: {{{

!python

Installing pip. While: Installing pip.

An internal error occurred due to a bug in either zc.buildout or in a recipe being used: Traceback (most recent call last): File "c:\workspace\django_app\eggs\zc.buildout-1.5.1-py2.6.egg\zc\buildout\buildout.py", line 1784, in main getattr(buildout, command)(args) File "c:\workspace\django_app\eggs\zc.buildout-1.5.1-py2.6.egg\zc\buildout\buildout.py", line 569, in install installed_files = self[part]._call(recipe.install) File "c:\workspace\django_app\eggs\zc.buildout-1.5.1-py2.6.egg\zc\buildout\buildout.py", line 1276, in _call return f() File "c:\workspace\django_app\eggs\gp.recipe.pip-0.5.2-py2.6.egg\gp\recipe\pip__init.py", line 211, in install return Scripts.install(self) File "c:\workspace\django_app\eggs\zc.recipe.egg-1.3.2-py2.6.egg\zc\recipe\egg\egg.py", line 145, in install reqs, ws = self.working_set() File "c:\workspace\django_app\eggs\gp.recipe.pip-0.5.2-py2.6.egg\gp\recipe\pip__init.py", line 167, in working_set assert os.path.isfile(executable) AssertionError }}}

So i've checked the init.py File from gp.recipe.pip and found out, that on Line 26 in the Method "get_executable" it's only checking for a subfolder called "bin" but under windows it's called "Scripts". So I added the Subfolder to be checked and the Executable is found.

After rerunning the buildout i get this error-message: {{{

!python

Installing pip. While: Installing pip.

An internal error occurred due to a bug in either zc.buildout or in a recipe being used: Traceback (most recent call last): File "c:\workspace\django_app\eggs\zc.buildout-1.5.1-py2.6.egg\zc\buildout\buildout.py", line 1784, in main getattr(buildout, command)(args) File "c:\workspace\django_app\eggs\zc.buildout-1.5.1-py2.6.egg\zc\buildout\buildout.py", line 569, in install installed_files = self[part]._call(recipe.install) File "c:\workspace\django_app\eggs\zc.buildout-1.5.1-py2.6.egg\zc\buildout\buildout.py", line 1276, in _call return f() File "c:\workspace\django_app\eggs\gp.recipe.pip-0.5.2-py2.6.egg\gp\recipe\pip__init.py", line 212, in install return Scripts.install(self) File "c:\workspace\django_app\eggs\zc.recipe.egg-1.3.2-py2.6.egg\zc\recipe\egg\egg.py", line 145, in install reqs, ws = self.working_set() File "c:\workspace\django_app\eggs\gp.recipe.pip-0.5.2-py2.6.egg\gp\recipe\pip__init.py", line 171, in working_set site_packages = glob.glob(join(part_dir, 'lib', '*', 'site-packages'))[0] IndexError: list index out of range }}}

So I've checked what you want do to and found out, that the path deklared there must be wrong... you search for a path like "lib//site-packages" but this one doesn't exist under Windows. So I've changed the Path to "lib/site-packages/" and finally it all worked.

I thought you might want to fix that.

Greetings, Hansa

Comments (0)

  1. Log in to comment