1. Tarek Ziadé
  2. distribute
Issue #356 new

Installation of distribute is slow on Python 3

Marius Gedminas
created an issue

Compare:

mg@platonas: /tmp $ time virtualenv -p python2.7 --distribute env27
Running virtualenv with interpreter /usr/bin/python2.7
New python executable in env27/bin/python2.7
Also creating executable in env27/bin/python
Installing distribute...........................................................................................................................................................................................................................done.
Installing pip................done.

real    0m0.990s
user    0m0.792s
sys     0m0.192s

with

mg@platonas: /tmp $ time virtualenv -p python3.3 env33
Running virtualenv with interpreter /usr/bin/python3.3
Using base prefix '/usr'
New python executable in env33/bin/python3.3
Also creating executable in env33/bin/python
Installing distribute.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................done.
Installing pip................done.

real    0m8.115s
user    0m7.804s
sys     0m0.244s

This is on a fast Core i5 CPU and a solid state disk. You can see that distribute takes a long time to install on Python 3.3.

As far as I can tell, this is due to 2to3 doing its work:

mg@platonas: ~/src/distribute [hg:default] $ time 2to3 setuptools/ > /dev/null 2>/dev/null

real    0m4.724s
user    0m4.680s
sys     0m0.024s

Also, sometimes, for unclear reasons, 2to3 fails to do its work and distribute's installation fails on Python 3.

Many people (myself included) have come up with the conclusion that 2to3 is an attractive nuisance. We recommend a single source tree that uses the common language subset between 2 and 3, with perhaps a _compat.py module to even up some rough spots. This makes development easier, and installation faster.

I've heard that Vinay Sajip has done so already. Would you please consider merging his fork upstream?

Comments (1)

  1. Log in to comment