Opened 3 years ago

Closed 3 years ago

#28673 closed defect (fixed)

Do not create ipython symlink

Reported by: jhpalmieri Owned by:
Priority: blocker Milestone: sage-9.0
Component: packages: standard Keywords:
Cc: dimpase Merged in:
Authors: John Palmieri Reviewers: Dima Pasechnik
Report Upstream: N/A Work issues:
Branch: d2873c2 (Commits, GitHub, GitLab) Commit: d2873c2af9f2e36f7249bcf3d9a0d05e83601cb9
Dependencies: Stopgaps:

Status badges

Description

When python runs Python 3, the IPython spkg-install script creates a symlink ipython3 -> ipython in SAGE_LOCAL/bin, and this interferes with the installation process.

Change History (10)

comment:1 Changed 3 years ago by jhpalmieri

  • Branch set to u/jhpalmieri/ipython-no-symlink

comment:2 Changed 3 years ago by jhpalmieri

  • Commit set to f5b5d4f6490d2227e76ef5e2447022f1e3f9016f
  • Status changed from new to needs_review

New commits:

f5b5d4ftrac 28673: when installing IPython, do not create a symlink in spkg-install

comment:3 Changed 3 years ago by jhpalmieri

By the way, the deleted lines never really functioned as intended: in earlier versions of Sage, python was always installed as Python 2. In the most recent versions of Sage, with a Python 3 build, python2 is not installed, so there is no $SAGE_LOCAL/bin/python. In that case the test

if python -c 'import sys; sys.exit(sys.version_info.major != 3)'

will only test positively if the system python runs Python 3.

Also, the spkg-install procedure involves building elsewhere and then installing all at once into SAGE_LOCAL, so manually creating the symlink makes no sense at all.

comment:4 Changed 3 years ago by dimpase

is there a need to put rm -f "$SAGE_LOCAL"/bin/ipython into if clause? Certainly not needed on Linux...

comment:5 follow-up: Changed 3 years ago by jhpalmieri

I guess our current procedure uninstalls the old package first, so no, there is no need. (We used to at least try to be careful about deleting the old installation until we were sure that the new version built successfully.)

comment:6 Changed 3 years ago by git

  • Commit changed from f5b5d4f6490d2227e76ef5e2447022f1e3f9016f to d2873c2af9f2e36f7249bcf3d9a0d05e83601cb9

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

d2873c2trac 28673: when installing IPython, do not create a symlink in spkg-install

comment:7 in reply to: ↑ 5 Changed 3 years ago by dimpase

Replying to jhpalmieri:

I guess our current procedure uninstalls the old package first, so no, there is no need. (We used to at least try to be careful about deleting the old installation until we were sure that the new version built successfully.)

unistall only happens if it was properly installed (with sdh_... script), with the corresponding uninstall info stored. If not, it would be left there.

IMHO "rf -f blah" ignores the result - if blah was not there, there is still no error (although OSX might be different...)

comment:8 Changed 3 years ago by dimpase

  • Reviewers set to Dima Pasechnik

looks good to me. Please double-check that repeatedly running ./sage -f ipython on MacOS works, then you can set it to positive review.

comment:9 Changed 3 years ago by jhpalmieri

  • Status changed from needs_review to positive_review

comment:10 Changed 3 years ago by vbraun

  • Branch changed from u/jhpalmieri/ipython-no-symlink to d2873c2af9f2e36f7249bcf3d9a0d05e83601cb9
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.