-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Package request: SageMath #19090
Comments
Sage is a terrible mess to compile yourself. I recommend just using the Docker container. |
It is now possible to build Sage on Void. |
Maybe do a check list of the missing packages to xbps-src , so that people could do them. |
Sage is a great example of what Docker is useful for. |
I was previously able to build
|
Note that
It's also recommended to install at least
The difficult part would be to compile |
Indeed. So that you don't get huge files and build times. |
I would like to try to package sage, but I'm quite new to void. Where should I start? |
@Eloitor One could try to package some dependencies, see #19090 (comment) |
It's a long road, we are slowly packaging dependencies but it will take some time. It could be useful if you can test and review some pending PR: #29997, #30034, #30035, #30036. If you merge those 4 PR, then you can compile sage with all of them installed (FlintQS, lcalc-devel, mpfi-devel, givaro-devel, fflas_ffpack, linbox-devel). The more dependencies we have, fewer have to be compiled by sage. Other recently merged dependencies that you may want to install are: gp2c, gf2x-devel, ntl-devel, flintlib-devel, arb-devel, eclib-devel. At this point I can have sage-9.4.rc2 compiled in ~ 25 min with -j8. More important, all those dependencies can now be used for other purposes. I suggest that you focus on one or two packages and try to get them in good shape, pass QA, and get merged. It will take some time, but in my experience it's not a good idea to make too many half-baked PR at the same time. For example: try to get your lean-community package merged, and try to package m4ri and m4rie (both in one PR since they depend). Learn from that, e.g. how to test your templates in -musl and -i686, and also how to try cross compilation to see if it works, etc. |
@tornaria re:doctesting sage9.4, don't you get |
Yes, this is expected. I'm using the patch from https://trac.sagemath.org/ticket/32275 (commit dd75684). |
Just a note to self: python3-jupyter_ipywidgets in jupyterlab, for use with sage. |
@tornaria Do you also get this same list with sage 9.4, or is your list shorter :) ?
|
Are you able to compile sage on x86_64-musl ? I tried a few days ago and I the compilation stopped with an error in |
Thanks. |
@tornaria Same here on musl.
I hope soon the |
Can you try again with the following patch? diff --git a/build/pkgs/pyzmq/spkg-install.in b/build/pkgs/pyzmq/spkg-install.in
index 0ce404ee5a..b7260c6d27 100644
--- a/build/pkgs/pyzmq/spkg-install.in
+++ b/build/pkgs/pyzmq/spkg-install.in
@@ -1,6 +1,9 @@
# Since we use environment vars we have to generate setup.cfg
-echo "[build_ext]" > src/setup.cfg
+echo "[global]" > src/setup.cfg
+echo "skip_check_zmq = True" >> src/setup.cfg
+
+echo "[build_ext]" >> src/setup.cfg
# (I tried putting quotes around $SAGE_LOCAL to allow for spaces in
# the path---which is never used but is a good habit to support---but With this for me sage-9.4 compiles and tests ok on musl, except for the following doctest failures:
|
Just for the record: besides what it is already in PRs, I have working templates for
What's left for compiling sage-9.4 with standard procedure is:
Besides that, the remaining big packages seem to be gap and singular. They are both very useful independently of sage, so packaging those two is probably a worthwhile goal: sooner or later sage will use them from system, as well as maxima. Moreover, when we get to package sage we probably won't be using the standard compile procedure but compile sage-as-a-python-library on top of all system-installed dependencies, I think that's what arch does and it's the way to move forward; we can't PR a monolith into void. |
I've build Sage-9.4 using the pending PR. Now I would like to be able to call sage from python, for example using
but I get |
That's not expected to work, because sage installs python packages (in particular sagelib) into its own python venv (should be in SAGE_LOCAL). I think the simplest way for you is to run Note that you won't have access to other python packages installed in your system. If you need python packages that are not installed in sage venv, you can use When we get around to make a sage package, we will install sagelib in the system python venv as any other python package in void (in fact, I think sage will be just a python package with lots of dependencies). |
Ok, thanks for your answer. |
Can you install the python debugger in the sage venv? Try `sage -sh` for a
shell with all environment setup for sage.
…On Sat, Sep 4, 2021, 18:32 Eloi Torrents ***@***.***> wrote:
Ok, thanks for your answer.
I'm interested in installing sagelib in the system python venv because
then I could use python debuggers... I'm not sure how to debug using sage
-python.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#19090 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMCC27HHVUEXB2SYMDPZ5TUAKF73ANCNFSM4KUOAGWQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Thanks I try to use the debugger in VSCode... In arch it works well with the default python debugger. It uses the command
So I tried adding debugpy to sage venv using
But I don't know how to continue. I guess I should replace |
If you make PRs for these, would you mind linking back here as well?
Totally agree. Btw, it seems sage itself is (slowly) proceeding towards this, by making sage-the library pip installable. Ps. Will test your musl patch soon. |
For me the build on musl still fails
but I'm not using the PR's on my laptop, only packaged ones, so that may be the cause. |
I merged a few PR, please tell how I can help else to make progress on this. |
@leahneukirchen Great! How about #32601 next? |
Unfortunately python3.10 is not yet supported, we should track https://trac.sagemath.org/ticket/30766 I'm testing the branch in that ticket (commit c73bc97), hopefully it will be merged soon. |
We have all these bumps already, no? |
I guess yes (e.g. they're updating gmpy to work with python3.10, which we already have), so we only need those that affect sage the library (or stuff that we haven't packaged yet). |
@leahneukirchen How about #32641 next? |
@tornaria Do you think it's time to do |
I'll search for my old gap package; I'm not using it, since it will not be used by sage and it seems quite tricky (there are tons of packages for gap). See https://trac.sagemath.org/ticket/29644 and https://trac.sagemath.org/ticket/31761. It's a nice package to have, independently of sagemath. At some point we should start figuring out what's the best way to package sagemath: For (a) we don't need (can't use) a system gap. For (b) we require a system gap. The remaining packages that sagemath will use from system if available are:
I'll try to keep doing 1 or 2 a day from the standard list. Here there's a template for a meta package "sage-deps" which will install all deps to build sage using all possible system packages. https://github.com/tornaria/void-packages/blob/sage-deps/srcpkgs/sage-deps/template |
I suggest we start with (a), because we need to do the work for that anyway, and making a template isn't hard, and we can ship something. Ultimately, (b) would be nice to avoid duplication of all the python modules. |
Agreed. Do you think we should install sage into |
I don't think |
I think DESTDIR is supported? It doesn't really matter if there is no special do_install step... |
I agree, let's try with (a) first. |
See #34030 |
I'm closing this, as the relevant pr #34030 is almost good to go. |
https://www.sagemath.org
SageMath is a free open-source mathematics software system licensed under the GPL. It builds on top of many existing open-source packages: NumPy, SciPy, matplotlib, Sympy, Maxima, GAP, FLINT, R and many more. Access their combined power through a common, Python-based language or directly via interfaces or wrappers.
Mission: Creating a viable free open source alternative to Magma, Maple, Mathematica and Matlab.
The text was updated successfully, but these errors were encountered: