forked from sagemath/sage
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sagemathgh-36677: symengine and symengine_py 0.11
update symengine and symengine_py to the latest versions, support Cython 3 Also, provide spkg-configure for symengine and symengine_py. Closes sagemath#32421 Promote symengine_py to optional URL: sagemath#36677 Reported by: Dima Pasechnik Reviewer(s): Dima Pasechnik, Isuru Fernando, Matthias Köppe, Tobias Diez
- Loading branch information
Showing
13 changed files
with
104 additions
and
10 deletions.
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
tarball=symengine-VERSION.tar.gz | ||
sha1=11885879ddcd0a9ab69e36a79b93aef836d6c95d | ||
md5=4673c85b423241ce85a9df35a7ed61bb | ||
cksum=1344562381 | ||
sha1=a2c8957f2099c9199751b165f107bf93d6823818 | ||
md5=fe3c3fee1bd8dfdb9576fc2d28cb1076 | ||
cksum=3544211225 | ||
upstream_url=https://github.com/symengine/symengine/releases/download/vVERSION/symengine-VERSION.tar.gz |
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 @@ | ||
symengine |
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 @@ | ||
symengine |
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 |
---|---|---|
@@ -1 +1 @@ | ||
0.10.1 | ||
0.11.1 |
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,45 @@ | ||
SAGE_SPKG_CONFIGURE([symengine], [ | ||
m4_pushdef(SAGE_SYMENGINE_VERSION_MAJOR, [0]) | ||
m4_pushdef(SAGE_SYMENGINE_VERSION_MINOR, [11]) | ||
SAGE_SPKG_DEPCHECK([gmp arb ecm flint mpc mpfr], [ | ||
AC_CHECK_HEADER([symengine/symengine_config.h], [], [sage_spkg_install_symengine=yes]) | ||
AC_MSG_CHECKING([whether we can link a program using symengine]) | ||
SYMENGINE_SAVED_LIBS=$LIBS | ||
LIBS="$LIBS -lsymengine" | ||
AC_LINK_IFELSE([ | ||
AC_LANG_PROGRAM([[#include <symengine/expression.h>]], | ||
[[using SymEngine::Expression; | ||
Expression x("x"); | ||
auto ex = pow(x+sqrt(Expression(2)), 6);]] | ||
)], [AC_MSG_RESULT([yes])], [ | ||
AC_MSG_RESULT([no]); sage_spkg_install_symengine=yes | ||
LIBS=$SYMENGINE_SAVED_LIBS | ||
]) | ||
AC_MSG_CHECKING([symengine version >= ]SAGE_SYMENGINE_VERSION_MAJOR[.]SAGE_SYMENGINE_VERSION_MINOR) | ||
AC_RUN_IFELSE([ | ||
AC_LANG_PROGRAM( | ||
[[#include <symengine/symengine_config.h> | ||
#include <stdio.h> | ||
]], [[ | ||
fprintf(stderr, "%s\n", SYMENGINE_VERSION); | ||
if (SYMENGINE_MAJOR_VERSION >]] SAGE_SYMENGINE_VERSION_MAJOR[[) return 0; | ||
else if (SYMENGINE_MAJOR_VERSION ==]] SAGE_SYMENGINE_VERSION_MAJOR[[ && | ||
SYMENGINE_MINOR_VERSION >=]] SAGE_SYMENGINE_VERSION_MINOR[[) return 0; | ||
else return 1; | ||
]])], [ | ||
AC_MSG_RESULT([yes]) | ||
], [ | ||
AC_MSG_RESULT([no]) | ||
sage_spkg_install_symengine=yes | ||
], [ | ||
dnl assume that the person running cross-compiling | ||
dnl knows what they are doing | ||
AC_MSG_RESULT([yes]) | ||
]) | ||
]) | ||
m4_popdef([SAGE_SYMENGINE_VERSION_MAJOR]) | ||
m4_popdef([SAGE_SYMENGINE_VERSION_MINOR]) | ||
], [], [], [] | ||
) | ||
|
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
tarball=symengine.py-VERSION.tar.gz | ||
sha1=fbbf052e66077ec51df319444b71f94114f33d9e | ||
md5=fc5d2d7f571a880aa2e040214aed2ff0 | ||
cksum=2535731241 | ||
upstream_url=https://github.com/symengine/symengine.py/archive/vVERSION.tar.gz | ||
sha1=4a8da0d0a057c8709c5b28543dbb3d26a060f013 | ||
md5=d10f4ba5c27b09ef234fcafddf824ce5 | ||
cksum=1332096394 | ||
upstream_url=https://pypi.io/packages/source/p/symengine/symengine-VERSION.tar.gz |
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 @@ | ||
python-symengine |
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/py-symengine |
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 @@ | ||
dev-python/symengine |
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 |
---|---|---|
@@ -1 +1 @@ | ||
0.10.0 | ||
0.11.0 |
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 @@ | ||
SAGE_SPKG_CONFIGURE([symengine_py], [SAGE_PYTHON_PACKAGE_CHECK([symengine_py])]) |
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 |
---|---|---|
@@ -1 +1 @@ | ||
experimental | ||
optional |
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,43 @@ | ||
r""" | ||
Check for symengine_py | ||
""" | ||
|
||
# **************************************************************************** | ||
# Copyright (C) 2023 Dima Pasechnik | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License 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/ | ||
# **************************************************************************** | ||
|
||
from . import PythonModule | ||
from .join_feature import JoinFeature | ||
|
||
|
||
class symengine_py(JoinFeature): | ||
r""" | ||
A :class:`sage.features.Feature` describing the presence of the | ||
Python package :ref:`symengine_py <spkg_symengine_py>`. | ||
EXAMPLES:: | ||
sage: from sage.features.symengine_py import symengine_py | ||
sage: symengine_py().is_present() # optional - symengine_py | ||
FeatureTestResult('symengine_py', True) | ||
""" | ||
def __init__(self): | ||
r""" | ||
TESTS:: | ||
sage: from sage.features.symengine_py import symengine_py | ||
sage: isinstance(symengine_py(), symengine_py) | ||
True | ||
""" | ||
JoinFeature.__init__(self, 'symengine_py', | ||
[PythonModule('symengine', spkg="symengine_py", | ||
url="https://pypi.org/project/symengine")]) | ||
|
||
def all_features(): | ||
return [symengine_py()] |