Features for testing the presence of tdlib¶
- class sage.features.tdlib.Tdlib(*args, **kwds)[source]¶
Bases:
BuildModuleA
Featuredescribing the presence of the SageMath interface to the treedec (formerly tdlib) library.EXAMPLES:
sage: from sage.features.tdlib import Tdlib sage: Tdlib().is_present() # needs tdlib FeatureTestResult('tdlib', True) sage: Tdlib().is_present() # needs !tdlib FeatureTestResult('tdlib', False)
>>> from sage.all import * >>> from sage.features.tdlib import Tdlib >>> Tdlib().is_present() # needs tdlib FeatureTestResult('tdlib', True) >>> Tdlib().is_present() # needs !tdlib FeatureTestResult('tdlib', False)
from sage.features.tdlib import Tdlib Tdlib().is_present() # needs tdlib Tdlib().is_present() # needs !tdlib
A runtime check. We only check the “present” case because, if feature checks are _not_ deferred, the
needs !tdlibcan be satisfied (disabled at build time) at the same time we are able to import a module that was installed for a previous build of sage:sage: from sage.features.tdlib import Tdlib sage: Tdlib().is_present_at_runtime() # needs tdlib FeatureTestResult('tdlib', True)
>>> from sage.all import * >>> from sage.features.tdlib import Tdlib >>> Tdlib().is_present_at_runtime() # needs tdlib FeatureTestResult('tdlib', True)
from sage.features.tdlib import Tdlib Tdlib().is_present_at_runtime() # needs tdlib