Ticket #7799 (closed defect: fixed)
install_scripts should not install M2
| Reported by: | novoselt | Owned by: | tbd |
|---|---|---|---|
| Priority: | major | Milestone: | sage-4.3.1 |
| Component: | distribution | Keywords: | |
| Cc: | Work issues: | ||
| Report Upstream: | N/A | Reviewers: | Andrey Novoseltsev |
| Authors: | John Palmieri | Merged in: | sage-4.3.1.alpha0 |
| Dependencies: | Stopgaps: |
Description
I have done
install_scripts("/usr/local/bin/")
on a Ubuntu machine with installed Macaulay2 and it stopped working. Apparently, M2 is one of the scripts that the above command has copied and it tries to use M2 shipped with Sage. However, Sage does not include Macaulay2, the package for it is broken and the recommended way to use them together is to install Macaulay2 separately. This works fine before installing scripts and after, if I remove M2 from /usr/local/bin manually.
Attachments
Change History
comment:1 Changed 3 years ago by jhpalmieri
- Status changed from new to needs_review
- Authors set to John Palmieri
Changed 3 years ago by jhpalmieri
-
attachment
trac_7799-install-scripts.patch
added
patch for main Sage repository
Note: See
TracTickets for help on using
tickets.

Here's a patch. I think that the problem is, in the old version, the command 'which M2' was executed, and if it didn't return a system error (meaning that M2 didn't exist), then it installed the Sage script. The patch changes it so it checks if 'which M2' returns an error, and if not, then whether 'which M2' starts with SAGE_ROOT. If not, then M2 is already installed elsewhere, so don't install the Sage script. (Of course it does this for all of the scripts, not just for M2.)
I've also added a doctest.
We could also worry about whether M2 should be included here at all, given its status. I suggest that we keep it, since if my patch works the way I think, we should never install the script as long as we don't distribute a working version of M2, but if someone fixes the spkg for it, then we don't have to remember to reinstate it in 'install_scripts'.