Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
sage_setup.library_order: Skip libraries that were not detected
Browse files Browse the repository at this point in the history
  • Loading branch information
mkoeppe committed Aug 13, 2021
1 parent 7282b2b commit 4aff8a4
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions src/sage_setup/library_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,32 @@
# listed here will be added at the end of the list (without changing
# their relative order).
from sage.env import cython_aliases
aliases = cython_aliases()

arb_dylib_name = aliases["ARB_LIBRARY"]
library_order_list = aliases["SINGULAR_LIBRARIES"] + [
modules = ('fflas-ffpack', 'gsl', 'linbox', 'Singular',
'libpng', 'gdlib', 'm4ri', 'zlib', 'cblas')

aliases = cython_aliases(required_modules=(), optional_modules=modules)

if "ARB_LIBRARY" in aliases:
arb_dylib_names = [aliases["ARB_LIBRARY"]]
else:
arb_dylib_names = []

library_order_list = aliases.get("SINGULAR_LIBRARIES", []) + [
"giac", "intl", "curl",
"ec", "ecm"
] + aliases["LINBOX_LIBRARIES"] + aliases["FFLASFFPACK_LIBRARIES"] + aliases["GSL_LIBRARIES"] + [
] + aliases.get("LINBOX_LIBRARIES", []) + aliases.get("FFLASFFPACK_LIBRARIES", []) + aliases.get("GSL_LIBRARIES", []) + [
"pari", "flint", "ratpoints", "ecl", "glpk", "ppl",
arb_dylib_name, "mpfi", "mpfr", "mpc", "ntl", "gmp", "gmpxx",
] + arb_dylib_names + [
"mpfi", "mpfr", "mpc", "ntl", "gmp", "gmpxx",
"brial",
"brial_groebner",
"m4rie",
] + aliases["M4RI_LIBRARIES"] + [
] + aliases.get("M4RI_LIBRARIES", []) + [
"zn_poly", "gap",
] + aliases["GDLIB_LIBRARIES"] + aliases["LIBPNG_LIBRARIES"] + [
"m", "readline", "Lfunction" ,
] + aliases["CBLAS_LIBRARIES"] + aliases["ZLIB_LIBRARIES"]
] + aliases.get("GDLIB_LIBRARIES", []) + aliases.get("LIBPNG_LIBRARIES", []) + [
"m", "readline", "Lfunction",
] + aliases.get("CBLAS_LIBRARIES", []) + aliases.get("ZLIB_LIBRARIES", [])

# Make a dict with library:order pairs, where the order are negative
# integers sorted according to library_order_list. When sorting,
Expand Down

0 comments on commit 4aff8a4

Please sign in to comment.