-
-
Notifications
You must be signed in to change notification settings - Fork 655
Description
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:
- Move optional sage optimization backends (COIN, CPLEX, Gurobi) to separate Cython packages to remove OptionalExtension problems #28175: Move sage optimization backends to separate Cython packages to remove
OptionalExtension
problems - Follow-up: src/setup.py: Replace use of is_package_installed_and_updated by sage_conf or features #28815: Don't pass
SAGE_PKGS
tosrc/setup.py
. ReplaceOptionalExtension(...., package=....)
bycondition=Feature.is_present()
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