Skip to content

Replace sage.libs.giac with new optional package sagemath-giac #39376

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

Merged
merged 12 commits into from
Feb 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/pkgs/giac/type
Original file line number Diff line number Diff line change
@@ -1 +1 @@
standard
optional
2 changes: 1 addition & 1 deletion build/pkgs/sagelib/dependencies
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
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
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

----------
All lines of this file are ignored except the first.
Expand Down
10 changes: 10 additions & 0 deletions build/pkgs/sagemath_giac/SPKG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
==============================================================================
Sage: Open Source Mathematics Software: Giac integration
==============================================================================

This pip-installable source distribution ``sagemath-giac`` is a small
optional distribution for use with ``sagemath-standard``.

It provides a Cython interface to the ``libgiac`` library for the
purpose of symbolic integration and certain Groebner basis
calculations.
4 changes: 4 additions & 0 deletions build/pkgs/sagemath_giac/checksums.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
tarball=sagemath-giac-VERSION.tar.gz
sha1=6a134b2f98d5f55cec51415141354eacf675f211
sha256=4a565f0f279d9bce60332ec292fe487dd6d8f85f83066e6a582928cb611dd7f4
upstream_url=https://github.com/sagemath/sagemath-giac/archive/refs/tags/VERSION.tar.gz
1 change: 1 addition & 0 deletions build/pkgs/sagemath_giac/dependencies
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cysignals cython giac gmpy2 sagelib | $(PYTHON_TOOLCHAIN) $(PYTHON)
1 change: 1 addition & 0 deletions build/pkgs/sagemath_giac/package-version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.1.1
3 changes: 3 additions & 0 deletions build/pkgs/sagemath_giac/spkg-configure.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SAGE_SPKG_CONFIGURE([sagemath_giac], [
SAGE_PYTHON_PACKAGE_CHECK([sagemath_giac])
])
2 changes: 2 additions & 0 deletions build/pkgs/sagemath_giac/spkg-install.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
cd src
sdh_pip_install --no-build-isolation .
1 change: 1 addition & 0 deletions build/pkgs/sagemath_giac/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
optional
7 changes: 0 additions & 7 deletions src/doc/en/reference/libs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,6 @@ FLINT
sage/libs/flint/qsieve_sage
sage/libs/flint/ulong_extras_sage

Giac
----
.. toctree::
:maxdepth: 1

sage/libs/giac

GMP-ECM
-------
.. toctree::
Expand Down
1 change: 0 additions & 1 deletion src/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ host-requires = [
"pkg:generic/libgd",
"pkg:generic/gap",
"pkg:generic/gfan",
"pkg:generic/giac",
"pkg:generic/givaro",
"pkg:generic/glpk",
"pkg:generic/gmp",
Expand Down
2 changes: 1 addition & 1 deletion src/sage/features/giac.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def __init__(self):
True
"""
Executable.__init__(self, 'giac', executable='giac',
spkg='giac', type='standard')
spkg='giac', type='optional')


def all_features():
Expand Down
2 changes: 1 addition & 1 deletion src/sage/features/sagemath.py
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ def __init__(self):
"""
JoinFeature.__init__(self, 'sage.libs.giac',
[PythonModule('sage.libs.giac.giac')],
spkg='sagemath_giac', type='standard')
spkg='sagemath_giac', type='optional')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this feature not better now use the new sagemath-giac package to test it? sage.libs.giac.giac is always available.

Alternatively, if we no longer need the giac tests (because all tests are now in the new giac repo), then please remove it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This still works because the PythonModule test tries to import the module and it will fail if sagemath-giac is not installed:

sage: from sage.features.sagemath import sage__libs__giac
sage: sage__libs__giac().is_present()
FeatureTestResult('sage.libs.giac.giac', False)

There are indeed some integral tests in sagelib that have # needs sage.libs.giac. I did some work a month or two ago to carefully separate them from the # needs giac tests.



class sage__libs__homfly(JoinFeature):
Expand Down
Loading
Loading