Skip to content

Commit 3cf106e

Browse files
author
Release Manager
committed
gh-39376: Replace sage.libs.giac with new optional package sagemath-giac As the last step in #38668, we move `sage/libs/giac` into a separate package, * https://github.com/sagemath/sagemath-giac and make it optional. This module is already mostly independent of sage -- there is nothing in sagelib that depends on it unconditionally. Its main use is as an integration backend, where it is technically optional because we try whatever backends are available in succession and expect some to fail. In fact, the modules themselves are already optional if you are using meson. The `sage/libs/giac` directory is simply skipped when meson cannot find giac. It is not possible to do the same thing using the build system for sage-the-distro, however, which motivates the separate package. Many reasons are given in #38668 for why you might want to avoid giac, but the main reason for me right now is because it's not portable: it doesn't build and/or run on systems where the rest of sage works fine, including the one I am using most of the time. The new package uses the namespace `sagemath_giac` to work around missing namespace support in cython, but `sage.libs.giac` re-exports everything under the old name for backwards compatibility. URL: #39376 Reported by: Michael Orlitzky Reviewer(s): François Bissey, Michael Orlitzky, Tobias Diez
2 parents 9ea778b + d7a5f54 commit 3cf106e

24 files changed

+32
-19854
lines changed

build/pkgs/giac/type

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
standard
1+
optional

build/pkgs/sagelib/dependencies

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FORCE $(SCRIPTS) boost_cropped $(BLAS) brial cliquer cypari cysignals cython ecl eclib ecm flint libgd gap giac givaro glpk gmpy2 gsl iml importlib_metadata importlib_resources jupyter_core lcalc lrcalc_python libbraiding libhomfly libpng linbox m4ri m4rie memory_allocator mpc mpfi mpfr $(MP_LIBRARY) ntl numpy pari pip pkgconfig planarity ppl pplpy primesieve primecount primecountpy $(PYTHON) requests rw sage_conf singular symmetrica typing_extensions $(PCFILES) | $(PYTHON_TOOLCHAIN) sage_setup $(PYTHON) pythran
1+
FORCE $(SCRIPTS) boost_cropped $(BLAS) brial cliquer cypari cysignals cython ecl eclib ecm flint libgd gap givaro glpk gmpy2 gsl iml importlib_metadata importlib_resources jupyter_core lcalc lrcalc_python libbraiding libhomfly libpng linbox m4ri m4rie memory_allocator mpc mpfi mpfr $(MP_LIBRARY) ntl numpy pari pip pkgconfig planarity ppl pplpy primesieve primecount primecountpy $(PYTHON) requests rw sage_conf singular symmetrica typing_extensions $(PCFILES) | $(PYTHON_TOOLCHAIN) sage_setup $(PYTHON) pythran
22

33
----------
44
All lines of this file are ignored except the first.

build/pkgs/sagemath_giac/SPKG.rst

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
==============================================================================
2+
Sage: Open Source Mathematics Software: Giac integration
3+
==============================================================================
4+
5+
This pip-installable source distribution ``sagemath-giac`` is a small
6+
optional distribution for use with ``sagemath-standard``.
7+
8+
It provides a Cython interface to the ``libgiac`` library for the
9+
purpose of symbolic integration and certain Groebner basis
10+
calculations.
+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
tarball=sagemath-giac-VERSION.tar.gz
2+
sha1=6a134b2f98d5f55cec51415141354eacf675f211
3+
sha256=4a565f0f279d9bce60332ec292fe487dd6d8f85f83066e6a582928cb611dd7f4
4+
upstream_url=https://github.com/sagemath/sagemath-giac/archive/refs/tags/VERSION.tar.gz

build/pkgs/sagemath_giac/dependencies

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
cysignals cython giac gmpy2 sagelib | $(PYTHON_TOOLCHAIN) $(PYTHON)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.1.1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
SAGE_SPKG_CONFIGURE([sagemath_giac], [
2+
SAGE_PYTHON_PACKAGE_CHECK([sagemath_giac])
3+
])
+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
cd src
2+
sdh_pip_install --no-build-isolation .

build/pkgs/sagemath_giac/type

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
optional

src/doc/en/reference/libs/index.rst

-7
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,6 @@ FLINT
4848
sage/libs/flint/qsieve_sage
4949
sage/libs/flint/ulong_extras_sage
5050

51-
Giac
52-
----
53-
.. toctree::
54-
:maxdepth: 1
55-
56-
sage/libs/giac
57-
5851
GMP-ECM
5952
-------
6053
.. toctree::

src/pyproject.toml

-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ host-requires = [
4747
"pkg:generic/libgd",
4848
"pkg:generic/gap",
4949
"pkg:generic/gfan",
50-
"pkg:generic/giac",
5150
"pkg:generic/givaro",
5251
"pkg:generic/glpk",
5352
"pkg:generic/gmp",

src/sage/features/giac.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def __init__(self):
2525
True
2626
"""
2727
Executable.__init__(self, 'giac', executable='giac',
28-
spkg='giac', type='standard')
28+
spkg='giac', type='optional')
2929

3030

3131
def all_features():

src/sage/features/sagemath.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ def __init__(self):
560560
"""
561561
JoinFeature.__init__(self, 'sage.libs.giac',
562562
[PythonModule('sage.libs.giac.giac')],
563-
spkg='sagemath_giac', type='standard')
563+
spkg='sagemath_giac', type='optional')
564564

565565

566566
class sage__libs__homfly(JoinFeature):

0 commit comments

Comments
 (0)