Optional packages in conda

79 views
Skip to first unread message

mmarco

unread,
Jun 26, 2026, 8:28:37 AM (2 days ago) Jun 26
to sage-devel
Now that the recommended way to install sage is through conda (which makes it way easy that compiling from source), I am having the problem with installing optional packages.

Some (like sirocco)  are already in conda-forge, so it is easy to install them, but in particular, I am being unable to install Tides and Kenzo.

Which should be the way to install them? Should we create packages in conda forge for them?

Isuru Fernando

unread,
Jun 26, 2026, 10:42:55 AM (2 days ago) Jun 26
to sage-...@googlegroups.com
Yes, having them in conda-forge is the recommended way.

Isuru

--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/sage-devel/b653a3f9-3da4-4d19-b3cb-98b49b75a8e8n%40googlegroups.com.

mmarco

unread,
Jun 26, 2026, 10:57:51 AM (2 days ago) Jun 26
to sage-devel
How is the process to add a package to conda-forge?

mmarco

unread,
Jun 26, 2026, 11:01:40 AM (2 days ago) Jun 26
to sage-devel
Also, it might require changes in sage, to look for the corresponding files in the right place

Isuru Fernando

unread,
Jun 26, 2026, 11:08:47 AM (2 days ago) Jun 26
to sage-...@googlegroups.com
You can also ask your favourite AI model to give you the code for it.

Isuru

Dima Pasechnik

unread,
Jun 26, 2026, 11:41:25 AM (2 days ago) Jun 26
to sage-...@googlegroups.com, Miguel Angel Marco
On Fri, Jun 26, 2026 at 10:01 AM mmarco <miguel....@gmail.com> wrote:
>
> Also, it might require changes in sage, to look for the corresponding files in the right place

if one uses sage the distro, it will also need adding spkg-configure.m4 files.
But that's the only needed change, as these packages are not requiring
any extension modules,
and are loaded anyway, with runtime detection of their availability.
> To view this discussion visit https://groups.google.com/d/msgid/sage-devel/31bcb372-a978-444f-9c92-674057778fc3n%40googlegroups.com.

mmarco

unread,
Jun 26, 2026, 12:17:22 PM (2 days ago) Jun 26
to sage-devel
I meant that, for example, kenzo looks at the variable KENZO_FAS, which I think is not properly set when you install sage in conda-forge.  Tides depends on SAGE_LOCAL, which again, is not set in the conda-forge install. Would adding skpg-configure.m4 be enough to handle this?

Dima Pasechnik

unread,
Jun 26, 2026, 11:53:19 PM (2 days ago) Jun 26
to sage-...@googlegroups.com
On Fri, Jun 26, 2026 at 11:17 AM mmarco <miguel....@gmail.com> wrote:
>
> I meant that, for example, kenzo looks at the variable KENZO_FAS, which I think is not properly set when you install sage in conda-forge. Tides depends on SAGE_LOCAL, which again, is not set in the conda-forge install. Would adding skpg-configure.m4 be enough to handle this?

That's sort of a typical sage-distro insanity - doing settings for
Kenzo in the config of ecl
(sorry, Michael O. :-))
build/pkgs/ecl/spkg-configure.m4: AC_SUBST(SAGE_KENZO_FAS,
['${prefix}'/lib/ecl/kenzo.fas])

By right in should be in `build/pkgs/kenzo/spkg-configure.m4`

A quick hack is to get rid of all that KENZO_FAS spaghetti:
--- a/src/sage/features/kenzo.py
+++ b/src/sage/features/kenzo.py
@@ -62,11 +62,7 @@ class Kenzo(Feature):
ecl_eval("(setf *standard-output* *dev-null*)")

try:
- from sage.env import KENZO_FAS
- if KENZO_FAS:
- ecl_eval("(require :kenzo \"{}\")".format(KENZO_FAS))
- else:
- ecl_eval("(require :kenzo)")
+ ecl_eval("(require :kenzo)")

except RuntimeError:
return FeatureTestResult(self, False, reason="Unable to
make ECL require kenzo")
diff --git a/src/sage/interfaces/kenzo.py b/src/sage/interfaces/kenzo.py
index 8a90f0c424b..e1b3afde5d6 100644
--- a/src/sage/interfaces/kenzo.py
+++ b/src/sage/interfaces/kenzo.py
@@ -104,11 +104,7 @@ kenzo_names = ['add',
# example __sphere__ is defined as EclObject("sphere"). Hyphens
# are replaced with underscores to get valid Python identifiers.
if Kenzo().is_present():
- from sage.env import KENZO_FAS
- if KENZO_FAS:
- ecl_eval("(require :kenzo \"{}\")".format(KENZO_FAS))
- else:
- ecl_eval("(require :kenzo)")
+ ecl_eval("(require :kenzo)")

ecl_eval("(in-package :cat)")
ecl_eval("(setf *HOMOLOGY-VERBOSE* nil)")

and symlink kenzo.fas to where ecl finds its .fas files, namely, to
what's being output by

./sage --ecl -eval "(princ (SI:GET-LIBRARY-PATHNAME))" -eval "(quit)"

That is,

ln -s `pwd`/local/lib/ecl/kenzo.fas $(./sage --ecl -eval "(princ
(SI:GET-LIBRARY-PATHNAME))" -eval "(quit)")


------------------

As a matter of fact, ecl can be configured to search for .fas files in
particular directories.
This something we discussed (and discussed, and discussed... :-)) with upstream
on https://gitlab.com/embeddable-common-lisp/ecl/-/work_items/846
I just submitted a fix along these lines to Homebrew.
https://github.com/Homebrew/homebrew-core/pull/290044
Once it's in, Homebrew tap "dimpase/tap/maxima-ecl" will work together with ecl,
(so that "(require :maxima)" works out of the box)

I'll write a Kenzo Homebrew formula, it's shouldn't be hard, modelling
after dimpase/tap/maxima-ecl
(i.e. https://github.com/dimpase/homebrew-tap/blob/main/Formula/m/maxima-ecl.rb)


HTH
Dima


Dima
> To view this discussion visit https://groups.google.com/d/msgid/sage-devel/35f5f564-f36e-4f59-84c7-c4b7570ab17an%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages