Opened 13 years ago

Closed 11 years ago

#7230 closed defect (duplicate)

Switch from setuptools to Distribute

Reported by: Craig Citro Owned by: tbd
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: build Keywords:
Cc: wstein, Mike Hansen, Leif Leonhardy 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 13 years ago by Craig Citro

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 13 years ago by Craig Citro

Status: newneeds_review

comment:3 Changed 13 years ago by John Palmieri

Status: needs_reviewneeds_work
Summary: [with spkg, needs review] Switch from setuptools to Distribute[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 13 years ago by Craig Citro

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 13 years ago by John Palmieri

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 12 years ago by Leif Leonhardy

Cc: Leif Leonhardy added
Report Upstream: N/A

comment:7 Changed 11 years ago by John Palmieri

Status: needs_workpositive_review

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

comment:8 Changed 11 years ago by Jeroen Demeyer

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

comment:9 Changed 11 years ago by Jeroen Demeyer

Resolution: duplicate
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.