[Distutils] distribute and setuptools are fighting; my application is a casualty
Asheesh Laroia
asheesh at asheesh.org
Wed Oct 6 21:48:22 CEST 2010
Hey all,
Despite the dramatic subject line, I'm willing to be patient, friendly,
and flexible. I'm just trying to figure out the best way to do something
that used to work.
I have a (open source) (web) application at http://openhatch.org/ (code at
"git clone git://code.openhatch.org/milestone-a.git") that uses
bootstrap.py. Since a year ago, I used bootstrap.py plus zc.buildout to
provide a mini environment for my application.
Recently, that stopped working properly. A contributor ran "bootstrap.py"
as a regular user on Ubuntu 10.04, and got this error
<https://openhatch.org/bugs/msg475>. I'm using ... to skip parts but you
can see the full message at the link.
karen at laesa:~/Code/milestone-a$ python2.6 bootstrap.py
...
Getting distribution for 'distribute'.
...
Setuptools installation detected at /usr/lib/python2.6/dist-packages
...
Already patched.
/usr/lib/python2.6/dist-packages/setuptools.egg-info already patched.
After install bootstrap.
Creating
/usr/local/lib/python2.6/dist-packages/setuptools-0.6c11-py2.6.egg-info
error:
/usr/local/lib/python2.6/dist-packages/setuptools-0.6c11-py2.6.egg-info:
Permission denied
At this point it gives up:
An error occurred when trying to install distribute 0.6.14. Look above
this message for any errors that were output by easy_install.
The buildout is being done by a user who isn't root, so it's
straightforward that the user cannot modify /usr/local/lib/*. I thought
the nice thing about buildout was that it didn't require mutating the
system's state (and therefore doesn't require to be run as root). The only
way I've found to fix this is to ask people to "sudo easy_install
distribute". I'm okay putting that in the docs, but I want to make sure
that people don't run into this situation by accident.
I can reproduce it on my Debian desktop, too, if I do "pip uninstall
distribute" and then try to run bootstrap.py.
So my question is -- what should I do now? Should I provide a modified
bootstrap.py in my application that detects that the user needs to "sudo
easy_install distribute"? If so, what does that code look like?
(I've tried using the distribute.py from
http://bitbucket.org/tarek/buildout-distribute/src/tip/bootstrap.py and
get the same error.)
Honestly confused, and seeking help,
-- Asheesh.
P.S. I feel like a child whose parents are fighting, and while the
argument takes place, I sit hungry waiting for dinner. See also
http://lyrics.wikia.com/Moxy_Fr%C3%BCvous:The_Kids%27_Song
--
The last thing one knows in constructing a work is what to put first.
-- Blaise Pascal
More information about the Distutils-SIG
mailing list