-
-
Notifications
You must be signed in to change notification settings - Fork 503
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
Cleanup sage.env #27040
Comments
comment:2
SAGE_ROOT is harder. It doesn't correspond to any configuration features of anything. At best it is |
This comment has been minimized.
This comment has been minimized.
comment:4
Replying to @kiwifb:
One place where the |
comment:5
I see. debian choose to do something like that. In sage-on-gentoo SAGE_ROOT points to a location where there used to be something but is now empty. Does debian use SAGE_ROOT anywhere else? Otherwise they could just define SAGE_SCRIPTS_DIR directly. |
comment:6
Replying to @kiwifb:
To clarify, Debian doesn't change anything in On Debian, I tried setting |
comment:7
I can see it now. In vanilla sage So as far as we can see, it would be fine to set Looking at it there is one thing I have set There is a somewhat harmless appearance of |
This comment has been minimized.
This comment has been minimized.
Author: Jeroen Demeyer |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
comment:12
Scope extension. That's brave! I notice you mention
in sage-on-gentoo? I override it with the appropriate value during build of course. But it should work in most places. |
This comment has been minimized.
This comment has been minimized.
comment:14
Replying to @kiwifb:
Actually no. It's something I figured out independently. |
comment:15
Will using |
This comment has been minimized.
This comment has been minimized.
comment:18
Replying to @kiwifb:
No.
|
comment:19
Replying to @jdemeyer:
I get your argument and won't contest. but it has been used as the site-package location in the code so I am expecting changes, particularly where you exchange |
comment:20
Replying to @kiwifb:
If Sage is installed in If Sage is not installed in Do you know any code which is using |
This comment has been minimized.
This comment has been minimized.
comment:33
Replying to @jdemeyer:
Heh, I think there's a decent excuse for that, but it's still definitely questionable. Thanks anyways. Just glancing over the rest of the diff this looks like a vast improvement. I probably won't have a chance to test it out next week, but I want to try it on Cygwin. |
Dependencies: #27041 |
comment:34
Various doctest failures on the patchbot but only in deprecated functionality. |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
Reviewer: Erik Bray |
comment:37
This is definitely a vast improvement over the old version of this module. If any further changes are needed for any reason we can add them in follow-up tickets (though if maintainers of any particular downstream packages want to chime in with their own comments feel free to set back to needs_work/needs_info). Changing milestone to 8.7 as I don't think this is urgent: Most packagers already have their own patches to this module, and drastically changing it now is going to break those patches, only making this harder for getting an 8.6 release out. |
comment:38
Note that the dependency #27041 still needs review. |
comment:39
On nix, the test
breaks because maxima can't be found:
Is it the intention for that test to work in every environment? If its not, I think it is a step back. |
comment:40
It is very strange. Nothing in this ticket changes
if the message in runtime error was quoting |
comment:41
I suspect it is because the
Which isn't accurate for me. I don't mind that the fallbacks won't work on every system (if they would, there would be no point in making it configurable in the first place). But I'm not sure if we should include a test for those fallbacks. I've planned to just migrate my custom |
comment:42
I think the test is a good idea because it should work in all "normal" installation scenarios. Nix is the special one here, so it's not surprising to me that stuff breaks on Nix. |
comment:43
I disagree. In my opinion if tests depend on a certain environment, that is a bug. But I won't fight anyone on this. |
comment:44
That value for You would have to rethink quite a bit of the wiring of sage to eliminate the need for |
comment:45
Replying to @kiwifb:
I'm not saying this change is bad. If it works for more cases than it did before, that is great. I just think that the tests should work in the more "general" case (a python library can be anywhere in |
comment:46
Sure. In the case of |
Changed branch from u/jdemeyer/make_env_py_use_system_values_instead_of_using_seeds to |
Changed commit from |
comment:48
I think |
comment:49
Serious breakage: #27389 |
sage.all
should be importable and mostly usable even if no environment variables likeSAGE_ROOT
orSAGE_LOCAL
are set. This requires a new functionjoin
which is likeos.path.join
except thatNone
values are propagated.Several unneeded variables are removed.
Get rid of the over-engineered
$VAR
replacement stuff.In some places,
SAGE_LIB
(installed location of Sage) can be used instead ofSAGE_SRC
.Determine
SAGE_LIB
not fromsite-packages
but fromsage.__file__
Rename
_add_variable_or_fallback
->var
to shorten line lengths.There is a thread on sage-devel that complains about the failure in Debian of
import sage.all
from system Python.Depends on #27041
CC: @infinity0 @tobihan
Component: porting
Author: Jeroen Demeyer
Branch:
3b0a094
Reviewer: Erik Bray
Issue created by migration from https://trac.sagemath.org/ticket/27040
The text was updated successfully, but these errors were encountered: