setup.py intall --home=~/tmp doesn't work

Create issue
Issue #112 resolved
Former user created an issue

distribute/distribute-0.6.10> python2.6 setup.py install --home=~/tmp/distribute Before install bootstrap. Scanning installed packages No setuptools distribution found running install Checking .pth file support in /home/lemburg/tmp/distribute/lib/python/ 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: '/home/lemburg/tmp/distribute/lib/python/test-easy-install-11648.pth'

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

/home/lemburg/tmp/distribute/lib/python/

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).

Note that in standard distutils, the --home option will create all necessary directories, so the above traceback is unexpected.

Comments (4)

  1. Tarek Ziadé repo owner

    I can change it so it calls os.makedirs() for the directory, but you'll still bump into another problem:

    unlike distutils, setuptools will check if that directory is in PYTHONPATH, and will stop if /tmp/distribute/lib/python is not in PYTHONPATH. Meaning that the only way to launch it will be to add the path in PYTHON PATH:

    $ PYTHONPATH=/tmp/distribute/lib/python/ python setup.py install --home=/tmp/distribute
    
  2. Noufal Ibrahim

    I've gone ahead and added the os.makedirs() so that the solution Tarek suggested will work. You still have to add the directory to your PYTHONPATH though.

  3. Log in to comment