Skip to content
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

sage-env, sage.env: Remove unused environment and Python variables SAGE_ETC, SAGE_INC #32045

Closed
mkoeppe opened this issue Jun 23, 2021 · 17 comments

Comments

@mkoeppe
Copy link
Contributor

mkoeppe commented Jun 23, 2021

These variables are unused (and do not have a legitimate use any more).

If there are user packages around that use it... they will need repackaging as pip-installable packages anyway.

CC: @jhpalmieri @kiwifb @kliem @dimpase

Component: build: configure

Author: Matthias Koeppe

Branch/Commit: 6012b45

Reviewer: François Bissey, John Palmieri

Issue created by migration from https://trac.sagemath.org/ticket/32045

@mkoeppe mkoeppe added this to the sage-9.4 milestone Jun 23, 2021
@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jun 23, 2021

comment:1

I don't know how to deprecate global variables, so help is welcome.

@kliem
Copy link
Contributor

kliem commented Jun 23, 2021

comment:2

Basically lazy_import would work. However, it isn't allowed in there. So we basically need to copy it to create a small deprecated_string_class. All the special methods need to be copied, which is annoying but trivial.

What do you think about this solution?

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jun 23, 2021

comment:3

Probably not worth doing this. Let's just document it as deprecated.

@kiwifb
Copy link
Member

kiwifb commented Jun 23, 2021

comment:4

I thought I was (ab)using SAGE_ETC but it looks like it do go when I abandoned sage-env in sage-on-gentoo.

@kliem
Copy link
Contributor

kliem commented Jun 24, 2021

comment:5

Do you think people will catch on? Then again, they will catch on, once it's gone and then they can look up the release notes. So maybe just document it.

@kiwifb
Copy link
Member

kiwifb commented Jun 24, 2021

comment:6

I don't really think anyone will notice

fbissey@tarazed ~/sandbox/git-personal/sage $ grep -rI SAGE_ETC src/
src/bin/sage-env:    export SAGE_ETC="$SAGE_LOCAL/etc"
src/sage/env.py:SAGE_ETC = var("SAGE_ETC", join(SAGE_LOCAL, "etc"))
fbissey@tarazed ~/sandbox/git-personal/sage $ grep -rI SAGE_INC src/
src/sage/env.py:SAGE_INC = var("SAGE_INC", join(SAGE_LOCAL, "include"))

OK, there is one thing that need attention

build/pkgs/notebook/spkg-install.in:ETC_JUPYTER="$SAGE_ETC"/jupyter

But SAGE_INC can disappear now and no-one will miss it.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jun 24, 2021

comment:7

I originally just meant that we should deprecate the Python variables in sage.env.
Things in build that use environment variables set by sage-env are unaffected by that.

But we could, of course, also just remove the environment variables, too. Any user package that uses them should certainly be updated anyway to become properly pip-installable.

@mkoeppe

This comment has been minimized.

@mkoeppe mkoeppe changed the title sage.env: Deprecate SAGE_ETC, SAGE_INC sage-env, sage.env: Remove unused environment and Python variables SAGE_ETC, SAGE_INC Jun 24, 2021
@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jun 24, 2021

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jun 24, 2021

New commits:

e91e2d9build/pkgs/notebook/spkg-install.in: Use $SAGE_INST_LOCAL/etc/jupyter
6012b45src/bin/sage-env, src/sage/env.py: Remove SAGE_ETC, SAGE_INC

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jun 24, 2021

Author: Matthias Koeppe

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jun 24, 2021

Commit: 6012b45

@jhpalmieri
Copy link
Member

comment:11

This looks okay to me. @kiwifb, how about you?

@kiwifb
Copy link
Member

kiwifb commented Jun 24, 2021

comment:12

Replying to @jhpalmieri:

This looks okay to me. @kiwifb, how about you?

Yes, it looks perfectly fine to me. We are cutting dead branches really.

@jhpalmieri
Copy link
Member

Reviewer: François Bissey, John Palmieri

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jun 25, 2021

comment:14

Thanks!

@vbraun
Copy link
Member

vbraun commented Jul 6, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants