diff --git a/pkgs/sagemath-categories/README.rst b/pkgs/sagemath-categories/README.rst index cbfab7ea2df..81311e5a217 100644 --- a/pkgs/sagemath-categories/README.rst +++ b/pkgs/sagemath-categories/README.rst @@ -8,7 +8,7 @@ About SageMath "Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, and MATLAB" - Copyright (C) 2005-2020 The Sage Development Team + Copyright (C) 2005-2022 The Sage Development Team https://www.sagemath.org @@ -23,6 +23,12 @@ About this experimental pip-installable source distribution This pip-installable source distribution `sagemath-categories` is an experimental distribution of a small part of the Sage Library. Use at your own risk. It provides a small subset of the modules of the Sage library ("sagelib", `sagemath-standard`). It is a superset of the `sagemath-objects` (providing Sage objects, the element/parent framework, categories, the coercion system and the related metaclasses), making various additional categories available without introducing dependencies on additional mathematical libraries. +Dependencies +------------ + +When building from source, development packages of `gmp`, `mpfr`, and `mpc` are needed. + + Documentation ------------- diff --git a/pkgs/sagemath-objects/MANIFEST.in b/pkgs/sagemath-objects/MANIFEST.in index ee82e1ae64c..981e05fe7b1 100644 --- a/pkgs/sagemath-objects/MANIFEST.in +++ b/pkgs/sagemath-objects/MANIFEST.in @@ -53,6 +53,7 @@ include sage/misc/constant_function.* include sage/misc/call.* include sage/misc/bindable_class.* include sage/misc/namespace_package.p* +include sage/misc/package_dir.py include sage/misc/verbose.* include sage/misc/repr.* @@ -99,6 +100,7 @@ include sage/misc/randstate.* include sage/misc/misc.* # walltime, cputime # graft sage/features include sage/misc/package.* +include sage/misc/sagedoc.py graft sage/repl graft sage/server diff --git a/pkgs/sagemath-objects/README.rst b/pkgs/sagemath-objects/README.rst index 8e707fcd489..8058f633654 100644 --- a/pkgs/sagemath-objects/README.rst +++ b/pkgs/sagemath-objects/README.rst @@ -8,7 +8,7 @@ About SageMath "Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, and MATLAB" - Copyright (C) 2005-2020 The Sage Development Team + Copyright (C) 2005-2022 The Sage Development Team https://www.sagemath.org @@ -23,6 +23,12 @@ About this experimental pip-installable source distribution This pip-installable source distribution `sagemath-objects` is an experimental distribution of a small part of the Sage Library. Use at your own risk. It provides a small, fundamental subset of the modules of the Sage library ("sagelib", `sagemath-standard`), making Sage objects, the element/parent framework, categories, the coercion system and the related metaclasses available. +Dependencies +------------ + +When building from source, development packages of `gmp`, `mpfr`, and `mpc` are needed. + + Documentation ------------- diff --git a/src/sage/env.py b/src/sage/env.py index 7d6efd28f5e..6421de5e39a 100644 --- a/src/sage/env.py +++ b/src/sage/env.py @@ -398,7 +398,7 @@ def get_cblas_pc_module_name() -> str: default_required_modules = ('fflas-ffpack', 'givaro', 'gsl', 'linbox', 'Singular', - 'libpng', 'gdlib', 'm4ri', 'zlib', 'cblas') + 'libpng', 'gdlib', 'm4ri', 'zlib', 'cblas', 'ecl') default_optional_modules = ('lapack',) @@ -481,6 +481,22 @@ def cython_aliases(required_modules=None, from collections import defaultdict pc = defaultdict(list, {'libraries': ['z']}) libs = "-lz" + elif lib == 'ecl': + try: + # Determine ecl-specific compiler arguments using the ecl-config script + ecl_cflags = subprocess.run([ECL_CONFIG, "--cflags"], check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True).stdout.split() + ecl_libs = subprocess.run([ECL_CONFIG, "--libs"], check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True).stdout.split() + except subprocess.CalledProcessError: + if required: + raise + else: + continue + aliases["ECL_CFLAGS"] = list(filter(lambda s: not s.startswith('-I'), ecl_cflags)) + aliases["ECL_INCDIR"] = list(map(lambda s: s[2:], filter(lambda s: s.startswith('-I'), ecl_cflags))) + aliases["ECL_LIBDIR"] = list(map(lambda s: s[2:], filter(lambda s: s.startswith('-L'), ecl_libs))) + aliases["ECL_LIBRARIES"] = list(map(lambda s: s[2:], filter(lambda s: s.startswith('-l'), ecl_libs))) + aliases["ECL_LIBEXTRA"] = list(filter(lambda s: not s.startswith(('-l','-L')), ecl_libs)) + continue else: try: aliases[var + "CFLAGS"] = pkgconfig.cflags(lib).split() @@ -537,15 +553,6 @@ def uname_specific(name, value, alternative): except (ValueError, KeyError): pass - # Determine ecl-specific compiler arguments using the ecl-config script - ecl_cflags = subprocess.run([ECL_CONFIG, "--cflags"], check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True).stdout.split() - aliases["ECL_CFLAGS"] = list(filter(lambda s: not s.startswith('-I'), ecl_cflags)) - aliases["ECL_INCDIR"] = list(map(lambda s: s[2:], filter(lambda s: s.startswith('-I'), ecl_cflags))) - ecl_libs = subprocess.run([ECL_CONFIG, "--libs"], check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True).stdout.split() - aliases["ECL_LIBDIR"] = list(map(lambda s: s[2:], filter(lambda s: s.startswith('-L'), ecl_libs))) - aliases["ECL_LIBRARIES"] = list(map(lambda s: s[2:], filter(lambda s: s.startswith('-l'), ecl_libs))) - aliases["ECL_LIBEXTRA"] = list(filter(lambda s: not s.startswith(('-l','-L')), ecl_libs)) - # NTL aliases["NTL_CFLAGS"] = ['-std=c++11'] aliases["NTL_INCDIR"] = [NTL_INCDIR] if NTL_INCDIR else []