-
-
Notifications
You must be signed in to change notification settings - Fork 487
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
FriCAS spkg-configure and Feature #35838
Merged
Merged
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
5f383d6
More # optional
mkoeppe 66db7aa
Add # optional - numpy etc.
mkoeppe 753ac98
src/sage/interfaces/tides.py: pycodestyle fix
mkoeppe 0eb6d0a
Massive modularization fixes
mkoeppe 8ee15dc
More # optional
mkoeppe caa8684
sage.interfaces: Modularization fixes
mkoeppe 2b0112d
More # optional
mkoeppe fa01165
More # optional
mkoeppe 19a524b
More # optional
mkoeppe e953197
./sage -fixdoctests --no-test src/sage/interfaces
mkoeppe 85baf28
sage.interfaces: Update # needs
mkoeppe 1393952
src/sage/interfaces: Update file-level doctest tag
mkoeppe 12e2a46
src/sage/interfaces: sage -fixdoctests --only-tags
mkoeppe 0bff9f6
Fix # needs for sagemath-pari
mkoeppe 20b960d
Add # needs
mkoeppe cd3543c
Update # needs
mkoeppe f4999b0
more distros for fricas
dimpase 21ab2c7
spkg-configure for fricas
dimpase 467eff9
remove debugging echo
dimpase 6ed8cb0
do not insist on sbcl
dimpase 2fd6098
modify the way to send )quit to fricas
dimpase ba63341
updated design of feature
dimpase 77b1e7a
better string to match (for various lisps)
dimpase 43c85c8
src/sage/interfaces/fricas.py: Use file-level doctest tag
mkoeppe 9ec6b94
sage.interfaces.expect: Delay construction of command to first use, h…
mkoeppe 26e2e58
src/sage/interfaces/fricas.py: Use the FriCAS feature less eagerly
mkoeppe b474f0e
sage.interfaces.expect: Fix up ulimit
mkoeppe 256bb8c
sage.interfaces.expect: Update doctest output
mkoeppe ace41e4
src/sage/interfaces/fricas.py: Do not rely on '# tol' for complex tol…
mkoeppe 870fa22
src/sage/functions/special.py: Use 'abs tol' instead of 'tol' in two …
mkoeppe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
fricas |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
math/fricas |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sci-mathematics/fricas |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
fricas |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
SAGE_SPKG_CONFIGURE( | ||
[fricas], [ | ||
AC_CACHE_CHECK([for FriCAS >= 1.3.8], [ac_cv_path_FRICAS], [ | ||
AC_PATH_PROGS_FEATURE_CHECK([FRICAS], [fricas], [ | ||
fricas_version=`echo ")quit" | $ac_path_FRICAS -nox -noclef | grep Version | tail -1 2>&1 \ | ||
| $SED -n -e 's/.* Version: FriCAS //p'` | ||
AS_IF([test -n "$fricas_version"], [ | ||
AX_COMPARE_VERSION([$fricas_version], [ge], [1.3.8], [ | ||
ac_cv_path_FRICAS="$ac_path_FRICAS" | ||
ac_path_FRICAS_found=: | ||
]) | ||
]) | ||
]) | ||
]) | ||
AS_IF([test -z "$ac_cv_path_FRICAS"], [sage_spkg_install_fricas=yes]) | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
r""" | ||
Features for testing the presence of ``fricas`` | ||
""" | ||
|
||
# ***************************************************************************** | ||
# Copyright (C) 2023 Dima Pasechnik | ||
# | ||
# Distributed under the terms of the GNU General Public License (GPL) | ||
# as published by the Free Software Foundation; either version 2 of | ||
# the License, or (at your option) any later version. | ||
# https://www.gnu.org/licenses/ | ||
# ***************************************************************************** | ||
|
||
import os | ||
import subprocess | ||
from . import Executable, FeatureTestResult | ||
|
||
class FriCAS(Executable): | ||
r""" | ||
A :class:`~sage.features.Feature` which checks for the :ref:`fricas <fricas>` binary. | ||
|
||
EXAMPLES:: | ||
|
||
sage: from sage.features.fricas import FriCAS | ||
sage: FriCAS().is_present() # optional - fricas | ||
FeatureTestResult('fricas', True) | ||
""" | ||
def __init__(self): | ||
r""" | ||
TESTS:: | ||
|
||
sage: from sage.features.fricas import FriCAS | ||
sage: isinstance(FriCAS(), FriCAS) | ||
True | ||
""" | ||
Executable.__init__(self, name="fricas", spkg="fricas", | ||
executable="fricas", | ||
url="https://fricas.github.io") | ||
|
||
def is_functional(self): | ||
r""" | ||
Check whether ``fricas`` works on trivial input. | ||
|
||
EXAMPLES:: | ||
|
||
sage: from sage.features.fricas import FriCAS | ||
sage: FriCAS().is_functional() # optional - fricas | ||
FeatureTestResult('fricas', True) | ||
""" | ||
command = ['fricas -nosman -eval ")quit"'] | ||
try: | ||
lines = subprocess.check_output(command, stderr=subprocess.STDOUT, shell=True) | ||
except subprocess.CalledProcessError as e: | ||
return FeatureTestResult(self, False, | ||
reason="Call `{command}` failed with exit code {e.returncode}".format(command=" ".join(command), e=e)) | ||
|
||
expected = b"FriCAS" | ||
if lines.find(expected) == -1: | ||
return FeatureTestResult(self, False, | ||
reason="Call `{command}` did not produce output which contains `{expected}`".format(command=" ".join(command), expected=expected)) | ||
|
||
return FeatureTestResult(self, True) | ||
|
||
def all_features(): | ||
return [FriCAS()] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the indentation is a bit wild