Skip to content

Commit 92ba314

Browse files
committed
src/sage/features/sagemath.py: new feature for sage.libs.eclib
The meson build system is now capable of building sagelib without sage.libs.eclib. Here we add a new feature to represent it. In particular this allows us to use "needs sage.libs.eclib" in tests.
1 parent 94fe540 commit 92ba314

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

src/sage/features/sagemath.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,33 @@ def __init__(self):
537537
spkg='sagemath_ntl', type='standard')
538538

539539

540+
class sage__libs__eclib(JoinFeature):
541+
r"""
542+
A :class:`sage.features.Feature` describing the presence of
543+
:mod:`sage.libs.eclib`.
544+
545+
In addition to the modularization purposes that this tag serves,
546+
it also provides attribution to the upstream project.
547+
548+
TESTS::
549+
550+
sage: from sage.features.sagemath import sage__libs__eclib
551+
sage: sage__libs__eclib().is_present() # needs sage.libs.eclib
552+
FeatureTestResult('sage.libs.eclib', True)
553+
"""
554+
def __init__(self):
555+
r"""
556+
TESTS::
557+
558+
sage: from sage.features.sagemath import sage__libs__eclib
559+
sage: isinstance(sage__libs__eclib(), sage__libs__eclib)
560+
True
561+
"""
562+
JoinFeature.__init__(self, 'sage.libs.eclib',
563+
[PythonModule('sage.libs.eclib.mwrank')],
564+
spkg='eclib', type='standard')
565+
566+
540567
class sage__libs__giac(JoinFeature):
541568
r"""
542569
A :class:`sage.features.Feature` describing the presence of :mod:`sage.libs.giac`.

0 commit comments

Comments
 (0)