-
-
Notifications
You must be signed in to change notification settings - Fork 528
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 package sage_conf: Provides optional configuration information for sagelib #29038
Comments
Author: Matthias Koeppe |
This comment has been minimized.
This comment has been minimized.
New commits:
|
Commit: |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:5
why are you checking in files which apparently are meant to be generated from .in templates? |
comment:6
A mistake, which I will fix in a moment. Thanks! |
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.
This comment has been minimized.
This comment has been minimized.
comment:12
the example with |
comment:13
Replying to @dimpase:
Not without installing sage packages into the new venv. As far as I can see, one can only control whether system-packages are made available but not whether the originating venv's packages are made available. But I'd expect that this option will be invented at some point in Python. |
This comment has been minimized.
This comment has been minimized.
comment:15
is |
comment:16
Replying to @dimpase:
No. |
comment:17
|
comment:18
I copied the metadata from |
comment:19
Replying to @mkoeppe:
that line is 5.5 years old. With all respect, William has not contributed a line of code to sagemath since 2017. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:55
Replying to @embray:
Thanks! I've simplified |
comment:56
Replying to @embray:
No, to the contrary. This ticket defines a functional interface to configuration: to the shell, by The version of Packagers will just be able to generate a I have chosen this design (external to the
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:58
Replying to @embray:
Thanks for the suggestion. Done. |
Changed reviewer from Dima Pasechnik to Dima Pasechnik, Erik Bray |
comment:61
by the way, can you explain these 2 lines |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:63
Replying to @dimpase:
Without the But I have simplified the module by avoiding |
comment:64
OK for me. |
comment:66
Replying to @mkoeppe:
But it's not even documented what this is supposed to provide or how it's supposed to work. This is all very confusing. I don't really know what you mean by "functional" here. Do you mean executable? Why? Is there a specific reason for that? In any case I know of all that's needed here is at most a list of environment variables. In many cases this will just be static. If a packager has a need to generate some values for those variables programmatically they can do so however they like, but now they have to write a whole Python script that implements some undocumented interface. |
Changed commit from |
comment:67
Once again, it's more Pythonic to wrap Python-needed things into Python modules, as |
comment:68
Replying to @dimpase:
![citation needed]
Perhaps you missed it, but as I already explained above this is exactly what |
comment:69
The larger plan is laid out in #21707 - Split sage-env into 5. It explains how pieces fit together. A recommended read. |
comment:70
For reference, again sysconfig, which is a hard-coded Python module which reads from a plain text-file. Also recommended, the venv module which is actually a lot less mysterious than you guys seem to be making it out to be. The only magic involved is some support bits coded directly into the Python interpreter used for setting |
comment:71
Replying to @mkoeppe:
Thanks, that is useful. Obviously I've participated in that ticket before, but I wasn't sure if it was the ticket tying the rest of this together. I still believe that steps 3/4/5 can be achieved by different means which merit more discussion. But I'm on board with the overall plan :) |
comment:72
No problem. I know that it is not always possible to keep up with all developments when there are more important things to do. As you see in that plan in #21707, the present ticket on It has little to do with my venv-python3 tickets (which I haven't had time to work on). (In fact, I now think that your version at #29032 may, after all, be the simpler way to go at it -- but I have to get back to the python3-spkg-configure business later.) So there's no need to mix any "venv" discussion into the "sagelib configuration" discussion. The "regression" caused by this ticket is one that is affecting developers who switch between new and old branches. It is fixed by just merging current develop into the old branch. |
comment:73
Replying to @embray:
cf. [
No, obviously Python needs to do some non-Pythonic things under the hood, but then the interface is Pythonic, and |
comment:74
Replying to @mkoeppe:
For tickets where merging the current |
This ticket introduces a new Python package
sage_conf
../configure
time and install it at build time before starting to build/install sagelib usingsrc/setup.py
.sage_conf
by a method of their choice before starting to build/install sagelib.A
console_script
allows to query individual variable values from the shell, or output all variables in .env format:The module and the script are used as follows:
It provides configuration information to sagelib at installation time (
src/setup.py
).Ultimately we want to be able to install sagelib with
pip
. To support installation bypip
from PyPI, from an URL, etc., we cannot expect to configure the build like we do now, by writing the configuration to the filesrc/sage-env-config
. Moreover, if pip is running in--isolated
mode, also no environment variables are passed. Then the only information flow is through arguments topip build
and through the installed Python packages. By installingsage_conf
first, we make the configuration available to the pip install of sagelib.It provides configuration information to the docbuild, in particular about the install locations of documentation of external packages.
It provides configuration information to the runtime of sagelib, making sagelib more independent from the environment variables set by
src/bin/sage-env
(local/bin/sage-env
).a. By providing
SAGE_LOCAL
as one the configuration variables, it removes assumptions regarding install locations ofsagelib
relative to$SAGE_LOCAL
. This enables the following:Installing an experimental version of
sagelib
in other install locations, such as in a user site packages directory.Making
sagelib
available in a user's venv, as in the following example:Without this ticket:
With this ticket:
Add configure option --with-sage-venv=SAGE_VENV to create venv there instead of in SAGE_LOCAL #29013/spkg-configure.m4 for python3 #27824: Using the system python3 via spkg-configure.m4
b. For a broader context: see Meta-ticket: Split sage-env into 5 to clean up sage configuration #21707 Task: Split
sage-env
into 5CC: @kiwifb @antonio-rojas @isuruf @embray @infinity0 @timokau @jdemeyer @dimpase @jhpalmieri @vbraun
Component: build
Author: Matthias Koeppe
Branch:
af18a01
Reviewer: Dima Pasechnik, Erik Bray
Issue created by migration from https://trac.sagemath.org/ticket/29038
The text was updated successfully, but these errors were encountered: