[Distutils] How to force installing setuptools instead of distribute ?

Barry Warsaw barry at python.org
Thu Jul 1 17:19:36 CEST 2010


On Jul 01, 2010, at 11:10 AM, David Cournapeau wrote:

>Ubuntu Lucid uses distribute instead of setuptools, and I cannot
>manage to use setuptools with virtualenv because of this. I upgraded
>to the last version of virtualenv, which claims to install setuptools
>by default, but I still get distribute instead, and I would guess this
>is because of Ubuntu using distribute, but who knows....
>
>Is there a simple way to force virtualenv to install setuptools (the
>PJE version, *not* the distribute fork) ?

Yes.  For Lucid, I modified our version of virtualenv to accept a --setuptools
option to use traditional setuptools.

% virtualenv --version
1.4.5
% virtualenv --help
Usage: virtualenv [OPTIONS] DEST_DIR

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -v, --verbose         Increase verbosity
  -q, --quiet           Decrease verbosity
  -p PYTHON_EXE, --python=PYTHON_EXE
                        The Python interpreter to use, e.g.,
                        --python=python2.5 will use the python2.5 interpreter
                        to create the new environment.  The default is the
                        interpreter that virtualenv was installed with
                        (/usr/bin/python)
  --clear               Clear out the non-root install and start from scratch
  --no-site-packages    Don't give access to the global site-packages dir to
                        the virtual environment
  --unzip-setuptools    Unzip Setuptools or Distribute when installing it
  --relocatable         Make an EXISTING virtualenv environment relocatable.
                        This fixes up scripts and makes all .pth files
                        relative
  --distribute          Ignored.  Distribute is used by default.  See
                        --setuptools to use Setuptools instead of Distribute.
  --setuptools          Use Setuptools instead of Distribute. Set environ
                        variable VIRTUALENV_USE_SETUPTOOLS to make it the
                        default.

-Barry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20100701/ed621624/attachment.pgp>


More information about the Distutils-SIG mailing list