New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python scripts try to run before Python is built. #9992
Comments
Attachment: sage-make_relative.gz Attached only so I can provide a link to this - for most practical purposes this can be ignored. |
comment:1
Well, perhaps one should simply suppress (or avoid) the error message in case no Python is (yet) installed, but the script is really odd.
|
This comment has been minimized.
This comment has been minimized.
comment:3
Replying to @nexttime:
Or just not check if python is not run.
Yes. At the minute it tests binaries too.
That's not such a big deal.
OK, well this is easy to fix by putting an if [ -f '$SAGE_LOCAL/bin/python" ] ; then I'll leave you to modify the python script if you want to. |
comment:4
Replying to @sagetrac-drkirkby:
I think it should skip files matching
if [ -f '$SAGE_LOCAL/bin/python" ] ; then
# Run the python script.
fi That's an improvement, though it is not clear if we in the near future make Python a prerequisite (or intentionally use a system Python for such if one is present).
I thought you were going to rewrite it as a shell script (which could as well be called from |
comment:5
Replying to @nexttime:
I hope we don't.
No, I think it will be easier to leave it untouched, but only call it if Dave |
Attachment: trac_9992-run_sage-make_relative_conditionally.scripts.patch.gz SCRIPTS repo. Changes |
This comment has been minimized.
This comment has been minimized.
comment:6
Attached patch only runs If we want to allow other if command -v python >/dev/null; then
... I've left the |
Changed keywords from none to sage-make_relative sage-spkg |
Author: Leif Leonhardy |
Reviewer: John Palmieri |
comment:7
The code makes sense and it works: I applied that patch and made a new source distribution. When building that from scratch, the first 50 or so spkgs didn't run sage-make_relative. Once the python spkg was installed, they did run it. I also tried after temporarily getting rid of my system's python. Installing before the patch yields a possibly confusing error message (before the python spkg is installed, anyway), and after the patch there is no such error message. |
Merged: sage-4.7.3.alpha0 |
Milestone sage-4.7.3 deleted |
Changed merged from sage-4.7.3.alpha0 to sage-4.8.alpha0 |
As discussed here, the Python script
$SAGE_ROOT/spkg/base/sage-make_relative
is run before Python is built in Sage. On a system that do not have Python installed (like a fresh install of IBM's AIX operating system), this generates an error message message as this script is run.This could be quite worrying, to find that an important program like Python is missing.
The bottom of the file
$SAGE_ROOT/spkg/base/sage-spkg
has this:which indicates a failure of
sage-make_relative
is unimportant. But still it is annoying and led me to believe there was a more serious bug.It does not seem appropriate to let
sage-make_relative
fail, but it would be much better ifsage-make_relative
can be removed, and its functionality moved to the script that calls it, which is$SAGE_ROOT/spkg/base/sage-spkg
.I've attached a copy of
$SAGE_ROOT/spkg/base/sage-make_relative
, which I believe could be written much better. I'm attaching it, since I will want to create an external link to this file.Dave
Apply
to the Sage scripts repository.
CC: @jhpalmieri
Component: build
Keywords: sage-make_relative sage-spkg
Author: Leif Leonhardy
Reviewer: John Palmieri
Merged: sage-4.8.alpha0
Issue created by migration from https://trac.sagemath.org/ticket/9992
The text was updated successfully, but these errors were encountered: