I think it would be possible to use a single spkg for all of the additional binary wheels, where the main content of that spkg is a requirements.txt file listing versions and hashes.
I was naively looking at this from the point of view of someone maintaining a port of Sage to a single platform, which also happens to allow a single binary wheel to work for multiple versions of the OS. Looking at that linked file [https://github.com/sagemath/sage/blob/fdc545367173f836890b9cddbce0d7c032b10d2b/build/pkgs/rpds_py/checksums.ini] reveals that the linux situation is infinitely more complex. The version "pinning" apparently must be done separately for each release of each distro.
Probably there is no way to tame that maintenance headache. Possibly Sage could hope to "delegate" the job of deciding which version of each binary wheel is optimal for each release of each distro to the package maintainer(s) for that distro and to copy the data for those checksum.ini files from some known location within each distro. However, I don't see how that will work for the majority of distros given that they are not close to supporting the current version of Sage.
I don't know if this scheme will end up being simpler than installing Rust in the Sage build directory (which involves very little more than downloading and running rustup.sh). I hope it will.
--
You received this message because you are subscribed to a topic in the Google Groups "sage-devel" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sage-devel/vFsNl87zLxo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sage-devel+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/03d03a54-609c-444d-b834-7fb0663a8c7fn%40googlegroups.com.
The real driver of the complexity, then, is the number of different versions of python which Sage is obliged to support
When I build Sage for the macOS app my current process [...] Sage ends up with current (as of the time of my build) versions of jupyterlab and notebook, and those two packages end up having the dependencies against which they have actually been tested.
(I don't believe that even a project as large as jupyter has the capacity to test against all combinations of dependencies which would meet their specifications, but I do believe that they test pretty thoroughly against the newest allowed version of each dependency.)
I do a sanity check to see that the installed versions of jupyterlab and notebook work at a basic level, using the Sage kernel [...]
I think it would be be valuable to prepare a checklist for making such updates and add it to our developer documentation. I think Eric Gourgoulhon has some Jupyter notebooks that are a good test of graphics and typesetting, some of which is Sage-specific.
I think it would be possible to use a single spkg for all of the additional binary wheels, where the main content of that spkg is a requirements.txt file listing versions and hashes.
> Does this [platform-dependent standard package] mean that there will be different sage tarballs for supported platforms?
Yes. There are multiple "tarballs" (actually wheel files) listed in checksums.ini and uploaded/downloaded to/from GitHub Releases and the Sage mirrorsTogether they cover the supported platforms.
On the other hand, the "sage-10.4.tar.gz" tarball that is built by the Release Manager and put on the Sage mirrors (as well as the "sage-10.4.tar.gz" tarball that is built using the same procedure and put on GitHub Releases - https://github.com/sagemath/sage/releases/tag/10.4) does contain an upstream/ directory that is populated with the upstream tarballs/wheel files of all standard normal/wheel packages.
With the branch of https://github.com/sagemath/sage/pull/38219, also the new binary wheel files (such as rpds_py-0.18.1-cp310-cp310-macosx_11_0_arm64.whl and rpds_py-0.18.1-cp310-cp310-musllinux_1_2_i686.whl) will appear in this directory.
On Thursday, August 15, 2024 at 4:11:50 AM UTC+9 Matthias Koeppe wrote:On the other hand, the "sage-10.4.tar.gz" tarball that is built by the Release Manager and put on the Sage mirrors (as well as the "sage-10.4.tar.gz" tarball that is built using the same procedure and put on GitHub Releases - https://github.com/sagemath/sage/releases/tag/10.4) does contain an upstream/ directory that is populated with the upstream tarballs/wheel files of all standard normal/wheel packages.Do you mean this https://github.com/sagemath/sage/archive/refs/tags/10.4.tar.gz ? This one also does not have "upstream/" directory.
The installation guide does not tell me where I can download sage-10.4.tar.gz that contains upstream/ directory. Where is it?
With the branch of https://github.com/sagemath/sage/pull/38219, also the new binary wheel files (such as rpds_py-0.18.1-cp310-cp310-macosx_11_0_arm64.whl and rpds_py-0.18.1-cp310-cp310-musllinux_1_2_i686.whl) will appear in this directory.Would all they be included in (upstream/ directory of) the release tarball say sage-10.5.tar.gz?
Then I fear that platform-dependent standard package would be a sure way to bloat the release tarballs. A user on a specific platform is forced to download many unnecessary wheel files via sage-10.x.tar.gz. To avoid this, we are forced to provide different tarballs for different platforms. I am back to my original question...
The installation guide does not tell me where I can download sage-10.4.tar.gz that contains upstream/ directory. Where is it?
You may recall that we de-emphasized the use of self-contained tarballs in favor of pointing users to "git clone" earlier this year.
... we discussed the size of these wheel files previously in the thread "Current status of possibility of integrating libraries written in Rust into Sage" (https://groups.google.com/g/sage-devel/c/JiSryImYGe0/m/LeNyLi6dFAAJ).
- Each of the rpds_py wheel files is a few hundred kilobytes (https://pypi.org/project/rpds-py/#files). The total is a few megabytes.- Each of the (fewer) clarabel wheel files is under 2 megabytes (https://pypi.org/project/clarabel/#files), the total is under 10 megabytes.
... we discussed the size of these wheel files previously in the thread "Current status of possibility of integrating libraries written in Rust into Sage" (https://groups.google.com/g/sage-devel/c/JiSryImYGe0/m/LeNyLi6dFAAJ).- Each of the rpds_py wheel files is a few hundred kilobytes (https://pypi.org/project/rpds-py/#files). The total is a few megabytes.- Each of the (fewer) clarabel wheel files is under 2 megabytes (https://pypi.org/project/clarabel/#files), the total is under 10 megabytes.OK. Thanks for the clarification. I don't know how large is too large. We will know when users complain.
For comparison: The current total size is 1.4 gigabytes.For the sizes of the release tarballs since 9.0, see https://mirrors.mit.edu/sage/src/index.html
Do you mean this https://github.com/sagemath/sage/archive/refs/tags/10.4.tar.gz ? This one also does not have "upstream/" directory.No, that one is also automatically generated by GitHub and contains the same files as the .zip file.This one: https://github.com/sagemath/sage/releases/download/10.4/sage-10.4.tar.gz (hint: the list of Release Assets is sorted alphabetically)
For comparison: The current total size is 1.4 gigabytes.For the sizes of the release tarballs since 9.0, see https://mirrors.mit.edu/sage/src/index.html
Why don't we upload only sage-10.x.tar.gz as assets? It contains all other files uploaded there.
On Thursday, August 15, 2024 at 4:10:27 PM UTC-7 Kwankyu Lee wrote:> those tarballs should be reachable by a click from the installation guide.That's exactly where the existing link in the installation guide leads, after the mirror selection.
Note that the decision to de-emphasize use of the self-contained tarballs was made deliberately. I see no reason to reverse it.
Currently all "standard" packages of the Sage distribution, by policy (https://doc.sagemath.org/html/en/developer/packaging.html; recommended reading),- either can be installed from source ("normal" packages);
- or they are Python packages that can be installed from platform-independent wheels. [...]
In https://github.com/sagemath/sage/pull/38219 (needs review), I propose the following mild policy change:
- as a third option, a "standard" package is allowed to be a Python package that can be installed from platform-dependent (binary) wheels. In this case, a "configure" option must be provided that disables the package. [...]
I consider this approved.
The implementation of the binary wheel infrastructure in https://github.com/sagemath/sage/pull/38219 is ready for review.
I consider this approved.While I don't think I would be opposed to the proposal here, I believe that our policy says that for a disputed PR to be "approved," a vote needs to happen here or on the PR.
What is currently not clear to me is *where* those binary wheels are going to come from
and how we're going to test/ensure that they are available for the platforms that we commit to supporting.
It would also be good to think about what we're going to do if at some point we find that for one of our supported platforms such wheels are not available. Are we going to just drop that platform? We might have to.
Or perhaps it's more advantageous to then "gracefully" reduce functionality and still provide sagemath for that platform; just not with the functionality that relies on the unavailable binary.
But then it becomes more like an optional prerequisite for enhancing functionality.
I think the discussion is the important part here: by the looks of it reality is forcing the something like the policy on us, and we can't really vote that away.
I don't consider this approved, as my complaint about the previous discussions and related proposals and credits due is not addressed
On the google groups comment linked to by the second reference you give, Dima does link to a very explicit proposal that does share substantial features with the proposed policy change discussed here.
On Tue, Aug 6, 2024 at 9:45 PM Nathan Dunfield <nat...@dunfield.info> wrote:
> As I understand it, while both proposals result in binary wheels being pulled off PyPI for certain standard packages, they differ in that:
>
> a) The current proposal requires the version of the package to be pinned (with checksums).
Does this mean using `--require-hashes` while calling pip, i.e.
https://pip.pypa.io/en/stable/topics/secure-installs/#hash-checking-mode ? [...]
Dima has already pointed out a substantial similarity between the proposals.