Opened 12 years ago

Closed 10 years ago

#7230 closed defect (duplicate)

Switch from setuptools to Distribute

Reported by: craigcitro Owned by: tbd
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: build Keywords:
Cc: wstein, mhansen, leif Merged in:
Authors: Reviewers: John Palmieri
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges


Distribute is a fork of setuptools that aims to be open and actively maintained. It's also run by a handful of core Python devs.

There's a new spkg file, as well as updates to spkg/install and spkg/standard/deps. All three are sitting in this directory:

To test, delete the setuptools spkg, drop in the new install and deps, and then build sage. (Or, alternately, build the two spkgs that currently depend on setuptools -- Jinja and SQLAlchemy.)

Change History (9)

comment:1 Changed 12 years ago by craigcitro

I should say -- I've currently got a build from scratch running on my machine; I'll report any trouble I run into.

comment:2 Changed 12 years ago by craigcitro

  • Status changed from new to needs_review

comment:3 Changed 12 years ago by jhpalmieri

  • Status changed from needs_review to needs_work
  • Summary changed from [with spkg, needs review] Switch from setuptools to Distribute to [with spkg, needs work] Switch from setuptools to Distribute

It worked fine for me on sage.math, but with a 64-bit build on Mac OS X 10.5, it didn't: when it tried to build Sphinx, it couldn't find Jinja. (Then I very cleverly deleted the log file, so I can't reproduce the exact error message. I'm building again, trying both 32- and 64-bit, and I'll post the error message assuming I get it again.)

Also, #6586 has just been merged in to 4.2.alpha0, and this includes jinja2 (in addition to jinja). Do you need to modify deps and install to deal with jinja2?

comment:4 Changed 12 years ago by craigcitro

Yep, it failed on my Mac, too. I have no idea why: it's having trouble finding the Jinja egg, which is there in site-packages, and is listed in easy_install.pth! Here's the error message:

Installed /Users/craigcitro/Desktop/four-one-two/local/lib/python2.6/site-packages/Sphinx-0.5.1-py2.6.egg
Processing dependencies for Sphinx==0.5.1
Searching for Jinja>=1.1
Best match: Jinja 1.2
Processing Jinja-1.2.tar.gz
Running Jinja-1.2/ -q bdist_egg --dist-dir /var/folders/L+/L+y6mfGYHtmJhXJSt0GpXE+++TI/-Tmp-/easy_install-3zfQSo/Jinja-1.2/egg-dist-tmp-lzQOap
No eggs found in /var/folders/L+/L+y6mfGYHtmJhXJSt0GpXE+++TI/-Tmp-/easy_install-3zfQSo/Jinja-1.2/egg-dist-tmp-lzQOap (setup script problem?)
error: Could not find required distribution Jinja>=1.1

It's clearly trying to go out and grab a dependency from the internet -- but I don't know why. In theory, that dependency should be provided already ... here's easy_install.pth:

import sys; sys.__plen = len(sys.path)
import sys; new=sys.path[sys.__plen:]; del sys.path[sys.__plen:]; p=getattr(sys,'__egginsert',0); sys.path[p:p]=new; sys.__egginsert = p+len(new)

It's identical to the easy_install.pth installed via setuptools; I have no idea why it's failing.

comment:5 Changed 12 years ago by jhpalmieri

Well, I couldn't reproduce that error because I got one when trying to build jinja; it's still trying to use setuptools:

This script requires setuptools version 0.6c5 to run (even to display
help).  I will attempt to download it for you (from, but
you may need to enable firewall access for this script first.
I will start the download in 15 seconds.

(Note: if this machine does not have network access, please obtain the file

and place it in this directory before rerunning this script.)
Traceback (most recent call last):

urllib2.HTTPError: HTTP Error 404: Not Found
Error installing Jinja.

I get this with both 32-bit and 64-bit.

As I said earlier, I've also seen a different error -- it got a little farther and bombed when it reached Sphinx, and it was trying to download Jinja1.2. In that case, there were files "setuptools.pth" and "setuptools-0.6....egg" in SAGE_ROOT/local/lib/python/site-packages by the time the build failed.

comment:6 Changed 11 years ago by leif

  • Cc leif added
  • Report Upstream set to N/A

comment:7 Changed 10 years ago by jhpalmieri

  • Status changed from needs_work to positive_review

This can be closed: #11363 has made it redundant.

comment:8 Changed 10 years ago by jdemeyer

  • Authors Craig Citro deleted
  • Milestone changed from sage-4.7.1 to sage-duplicate/invalid/wontfix
  • Reviewers set to John Palmieri
  • Summary changed from [with spkg, needs work] Switch from setuptools to Distribute to Switch from setuptools to Distribute

comment:9 Changed 10 years ago by jdemeyer

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