Opened 11 years ago

Closed 11 years ago

#4317 closed defect (fixed)

[with patch; positive review] Fix easy-install.pth after moving Sage

Reported by: zimmerma Owned by: mabshoff
Priority: blocker Milestone: sage-3.2.1
Component: relocation Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description

To reproduce:

1) build sage from source, say in /tmp/sage-3.1.4

2) type make install DESTDIR=/usr/local/sage-3.1.4 (for example)

3) modify a file in /usr/local/sage-3.1.4, say integers.pyx (for example change the default base for digits)

4) run /usr/local/sage-3.1.4/bin/sage -br

5) try the modified function: the change has not been taken into account!

The fix is to rename /tmp/sage-3.1.4 into (say) /tmp/sage-3.1.4-old. It appears the relocation does not work any more, or more precisely that sage first looks into the build directory if it still exists.

Attachments (1)

trac_4317_scripts.patch (1.4 KB) - added by was 11 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 11 years ago by mabshoff

  • Milestone changed from sage-3.2.1 to sage-3.2
[11:04pm] mabshoff: craigcitro: so the problem happens when we deal with changed py files - not pyx?
[11:04pm] craigcitro: i haven't tested pyx
[11:04pm] mabshoff: ok
[11:04pm] craigcitro: got it.
[11:04pm] craigcitro: well, got halfway there, anyway
[11:04pm] mabshoff: Paul hits the same problem with pyx files, too.
[11:05pm] mabshoff: Excellent 
[11:05pm] craigcitro: there's a file called $SAGE_ROOT/local/lib/python-2.5/site-packages/easy-install.pth
[11:05pm] craigcitro: that file has your directory in it.
[11:05pm] craigcitro: kill the line with your directory, everything works.
[11:05pm] mabshoff: ah
[11:06pm] mabshoff: So that file needs to be updated when a moved Sage install is detected.

comment:2 Changed 11 years ago by mabshoff

  • Summary changed from relocation after make install is broken to Fix easy-install.pth after moving Sage

Check out http://www.mail-archive.com/distutils-sig@python.org/msg05817.html

Also note that easy-install.pth is used in a bunch of places

mabshoff@sage:/scratch/mabshoff/release-cycle/sage-3.2.alpha2$ grep -r "easy-install.pth" *
install.log:Adding setuptools 0.6c8 to easy-install.pth file
install.log:Adding SQLAlchemy 0.4.6 to easy-install.pth file
install.log:Adding Jinja 1.2 to easy-install.pth file
install.log:Adding Pygments 0.11.1 to easy-install.pth file
install.log:Adding Sphinx 0.5dev-20081027 to easy-install.pth file
install.log:Adding docutils 0.5 to easy-install.pth file
install.log:Jinja 1.2 is already the active version in easy-install.pth
install.log:Pygments 0.11.1 is already the active version in easy-install.pth

comment:3 Changed 11 years ago by mabshoff

  • Milestone changed from sage-3.2.1 to sage-3.2

comment:4 Changed 11 years ago by was

  • Milestone changed from sage-3.2 to sage-3.2.1

comment:5 Changed 11 years ago by mabshoff

  • Owner changed from cwitty to mabshoff
  • Priority changed from major to blocker
  • Status changed from new to assigned

This really ought to get fixed for 3.2.1.

Cheers,

Michael

comment:6 Changed 11 years ago by mabshoff

  • Milestone changed from sage-3.2.2 to sage-3.2.1

comment:7 Changed 11 years ago by was

  • Summary changed from Fix easy-install.pth after moving Sage to [with patch; needs review] Fix easy-install.pth after moving Sage

Changed 11 years ago by was

comment:8 Changed 11 years ago by mabshoff

  • Summary changed from [with patch; needs review] Fix easy-install.pth after moving Sage to [with patch; positive review] Fix easy-install.pth after moving Sage

Positive review. I fixed the spelling issue that Craig pointed out to me.

Cheers,

Michael

comment:9 Changed 11 years ago by mabshoff

  • Resolution set to fixed
  • Status changed from assigned to closed

Merged in Sage 3.2.1.rc1

Note: See TracTickets for help on using tickets.