Skip to content

Replace OptionalExtension(...., package='bliss') by condition=BlissLibrary().is_present() #25828

@timokau

Description

@timokau

The last remaining (after #25825) piece of code that uses is_package_installed is OptionalExtension. Since it only provides the package kwarg for convenience, I thought it would make sense to just move to condition and add feature checks to use in module_list.py.

Moreover, OptionalExtension(..., package=....) does not take system packages checked for by spkg-configure.m4 (#27330) into account.

setup.py build_cython is extended by an option --require-features for the benefit of distribution builders who want to ensure a predictable build. For example:

./sage -sh -c "cd src && sage-python -u setup.py build_cython --require-features=sage.features.databases.DatabaseCremona"
....
sage.features.FeatureNotPresentError: Cremona's database of elliptic curves is not available.
'cremona/cremona.db' not found in any of ['/Users/mkoeppe/s/sage/sage-rebasing/local/share']
To install Cremona's database of elliptic curves you can try to run 'sage -i database_cremona_ellcurve'.
Further installation instructions might be available at https://github.com/JohnCremona/ecdata.

On the branch is one module for which a feature test is already available (bliss).

See also:

CC: @jdemeyer @antonio-rojas @kiwifb @dimpase @embray @isuruf

Component: build

Branch/Commit: u/mkoeppe/optional-extension-features @ b5e205f

Reviewer: Dima Pasechnik

Issue created by migration from https://trac.sagemath.org/ticket/25828

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions