Feature for testing the presence of libhomfly

class sage.features.libhomfly.Libhomfly(*args, **kwds)[source]

Bases: BuildModule

A sage.features.Feature describing the presence of sage.libs.homfly, the interface to libhomfly.

EXAMPLES:

sage: from sage.features.libhomfly import Libhomfly
sage: Libhomfly().is_present()  # needs libhomfly
FeatureTestResult('libhomfly', True)
sage: Libhomfly().is_present()  # needs !libhomfly
FeatureTestResult('libhomfly', False)
>>> from sage.all import *
>>> from sage.features.libhomfly import Libhomfly
>>> Libhomfly().is_present()  # needs libhomfly
FeatureTestResult('libhomfly', True)
>>> Libhomfly().is_present()  # needs !libhomfly
FeatureTestResult('libhomfly', False)
from sage.features.libhomfly import Libhomfly
Libhomfly().is_present()  # needs libhomfly
Libhomfly().is_present()  # needs !libhomfly

A runtime check. We only check the “present” case because, if feature checks are _not_ deferred, the needs !libhomfly can 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.libhomfly import Libhomfly
sage: Libhomfly().is_present_at_runtime()  # needs libhomfly
FeatureTestResult('libhomfly', True)
>>> from sage.all import *
>>> from sage.features.libhomfly import Libhomfly
>>> Libhomfly().is_present_at_runtime()  # needs libhomfly
FeatureTestResult('libhomfly', True)
from sage.features.libhomfly import Libhomfly
Libhomfly().is_present_at_runtime()  # needs libhomfly
sage.features.libhomfly.all_features()[source]