Features for testing the presence of package systems sage_spkg
, conda
, pip
, debian
, fedora
etc.¶
- class sage.features.pkg_systems.PackageSystem(*args, **kwds)[source]¶
Bases:
Feature
A
Feature
describing a system package manager.EXAMPLES:
sage: from sage.features.pkg_systems import PackageSystem sage: PackageSystem('conda') Feature('conda')
>>> from sage.all import * >>> from sage.features.pkg_systems import PackageSystem >>> PackageSystem('conda') Feature('conda')
- spkg_installation_hint(spkgs, prompt, feature)[source]¶
Return a string that explains how to install
feature
.EXAMPLES:
sage: from sage.features.pkg_systems import PackageSystem sage: homebrew = PackageSystem('homebrew') sage: homebrew.spkg_installation_hint('openblas') # optional - SAGE_ROOT 'To install openblas using the homebrew package manager, you can try to run:\n!brew install openblas'
>>> from sage.all import * >>> from sage.features.pkg_systems import PackageSystem >>> homebrew = PackageSystem('homebrew') >>> homebrew.spkg_installation_hint('openblas') # optional - SAGE_ROOT 'To install openblas using the homebrew package manager, you can try to run:\n!brew install openblas'
- class sage.features.pkg_systems.PipPackageSystem(*args, **kwds)[source]¶
Bases:
PackageSystem
A
Feature
describing the Pip package manager.EXAMPLES:
sage: from sage.features.pkg_systems import PipPackageSystem sage: PipPackageSystem() Feature('pip')
>>> from sage.all import * >>> from sage.features.pkg_systems import PipPackageSystem >>> PipPackageSystem() Feature('pip')
- class sage.features.pkg_systems.SagePackageSystem(*args, **kwds)[source]¶
Bases:
PackageSystem
A
Feature
describing the package manager of the SageMath distribution.EXAMPLES:
sage: from sage.features.pkg_systems import SagePackageSystem sage: SagePackageSystem() Feature('sage_spkg')
>>> from sage.all import * >>> from sage.features.pkg_systems import SagePackageSystem >>> SagePackageSystem() Feature('sage_spkg')