#803 closed defect (fixed)

python ./setup.py install -- can't create or remove files in install directory

Reported by: zooko Owned by: zooko
Priority: major Milestone: 1.7.0
Component: packaging Version: 1.5.0
Keywords: setuptools Cc: francois@…
Launchpad Bug:

Description

bewst reported:

$ python setup.py build
running darcsver
setup.py darcsver: Failure from attempt to find version tags with 'darcs changes', and src/allmydata/_version.py already exists, so leaving it alone.
running develop
Checking .pth file support in support/lib/python2.5/site-packages
error: can't create or remove files in install directory

The following error occurred while trying to add or remove files in the
installation directory:

    [Errno 2] No such file or directory: 'support/lib/python2.5/site-packages/test-easy-install-8824.pth'

The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    support/lib/python2.5/site-packages

This directory does not currently exist.  Please create it and try again, or
choose a different installation directory (using the -d or --install-dir
option).

This is part of http://bugs.python.org/setuptools/issue54 (be more like distutils with regard to --prefix=). There are some patches to fix this particular detail in zetuptoolz, the fork of setuptools which comes bundled in Tahoe-LAFS under the unfortunate name of [src:misc/dependencies/setuptools-0.6c12dev.egg?rev=20090205152818-92b7f-68bbee545bd9198bb3c4eb7cf9b84bf7d93e09d6 setuptools-0.6c12dev]. (I've also submitted the patches to the new Python Distribute Project, which will hopefully be the successor to setuptools: http://bitbucket.org/tarek/distribute/issue/46/be-more-like-distutils-with-regard-to .)

Anyway, the fact that bewst is getting this error message suggests that somehow real setuptools instead of zetuptoolz is being used to try to build Tahoe-LAFS. It's curious to wonder how this could happen. bewst: could you tell me what happens when you run python -c 'import pkg_resources;print pkg_resources.require("setuptools")'?

(bewst initially reported this on ticket #668, but that ticket is about running easy_install allmydata-tahoe and this ticket is about downloading the source, unpacking it, and running python ./setup.py install. This are intimately related, but the latter works for everyone else except bewst and the former doesn't work for anyone yet.)

Change History (7)

comment:1 Changed at 2009-09-21T20:45:20Z by zooko

bewst: which system was this on, and what do you get from

python -c 'import pkg_resources;print pkg_resources.require("setuptools")'

comment:2 Changed at 2009-09-22T02:27:15Z by bewst

  • Owner changed from bewst to zooko

It's ubuntu Intrepid and I get

[setuptools 0.7a1dev-r66388 (/usr/lib/python2.5/site-packages/setuptools-0.7a1dev_r66388-py2.5.egg)]

comment:3 follow-up: Changed at 2009-09-24T20:13:22Z by zooko

  • Owner changed from zooko to cgalvan

Interesting -- you have a newer alpha release of setuptools installed, so Tahoe-LAFS's bundled variant of setuptools won't install because it appears to be an earlier version that your version. #668 which Chris Galvan is currently working on will probably fix this. Assigning this ticket to Chris.

comment:4 in reply to: ↑ 3 Changed at 2010-01-17T17:38:11Z by nodakai

Replying to zooko:

Interesting -- you have a newer alpha release of setuptools installed, so Tahoe-LAFS's bundled variant of setuptools won't install because it appears to be an earlier version that your version.

On Debian testing (== squeeze) amd64, I've got the same problem. My environment:

$ python -c 'import pkg_resources;print pkg_resources.require("setuptools")'
[distribute 0.6.10 (/usr/lib/python2.5/site-packages)]
$ python -V
Python 2.5.4

I succeeded to get it build by the following workaround:

$ mkdir -p support/lib/python2.5/site-packages
$ export PYTHONPATH=support/lib/python2.5/site-packages:$PYTHONPATH
$ python setup.py build

comment:5 Changed at 2010-03-13T13:55:11Z by francois

  • Cc francois@… added

Hey, that's exactly what's happening on my new ARM buildbot running Debian squeeze.

http://allmydata.org/buildbot/builders/FranXois%20lenny-armv5tel/builds/112/steps/build/logs/stdio

comment:6 Changed at 2010-04-12T17:25:15Z by zooko

  • Milestone changed from undecided to 1.7.0
  • Owner changed from cgalvan to zooko
  • Status changed from new to assigned

My plan is to try replacing setuptools with distribute as well as submitting a couple of patches to distribute (http://bitbucket.org/tarek/distribute/issue/136/respect-the-pythonpath and http://bitbucket.org/tarek/distribute/issue/46/be-more-like-distutils-with-regard-to ).

(Help appreciated.)

comment:7 Changed at 2010-05-30T21:42:27Z by zooko

  • Resolution set to fixed
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.