key2/pythonsollya
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
Python/SageMath bindings for Sollya http://sollya.gforge.inria.fr/ https://gitlab.com/metalibm-dev/pythonsollya AUTHORS: - Nicolas Brunie <nibrunie@gmail.com> - Marc Mezzarobba <marc@mezzarobba.net> See also the CREDITS section below for details on material derived from existing works. LICENSE This software (including the documentation and logo available in the git repository) is distributed under the CECILL-C V2.1 license as detailed in the LICENSE file. REQUIREMENTS: As of pythonsollya 0.4.0: - Cython (tested with 0.29.14) - Sollya (master, tested weekly with fresh clone of https://gitlab.inria.fr/sollya/sollya.git) - SageMath (optional, tested with 9.2.beta12) - bigfloat (tested with 0.4.0) (The development branch of pythonsollya may require more recent versions.) SETUP - Installing via pip using something like $ pip install git+https://gitlab.com/metalibm-dev/pythonsollya should work, provided that a suitable version of Sollya can be found in a standard location on the system. The same goes for $ pip install [-e] . run from the root of a pythonsollya git checkout. - To build sagesollya (= pythonsollya + SageMath support) against a version of SageMath packaged by your distribution, run $ WITH_SAGE=true pip install git+https://gitlab.com/metalibm-dev/pythonsollya (You may need header files not automatically installed as dependencies of sagemath. For example, Debian users need to install the libpari-dev package in addition to sagemath.) With Sage packages from sagemath.org or a version of Sage built from source, you may need to run the above command in a "Sage shell" launched with "sage -sh" or to use "sage -pip" instead of pip. - Manual build and installation: use PYTHON and PIP variable to change between python2/python3 install, and WITH_EXTERNALDATA to enable support of Sollya's externaldata feature. $ make [SOLLYA_DIR=/sollya/installation/directory] [PYTHON=python3 PIP=pip3] [WITH_EXTERNALDATA=yes] $ make install [PREFIX=/destination/] [PYTHON=python3 PIP=pip3] Similarly, you can build sagesollya manually using $ make sagesollya.so [...as above...] [SAGE=/path/to/sage/executable] USAGE: There is no real user manual (yet?), but see the examples/ directory for some usage examples. Most functions behave like their interactive Sollya counterparts. TROUBLESHOOTING & MISCELLANEOUS NOTES: - Using PythonSollya with Sollya plugins When loaded from Sollya, plugins such as externalprocs and libraryfunctions can call libsollya functions without having to link to libsollya. Under PythonSollya, however, libsollya symbols typically are not accessible to shared libraries loaded after the sollya module is imported. To make Sollya plugins that call into libsollya work with PythonSollya, please either explicitly link to libsollya when compiling the plugin, or force Python to load PythonSollya with global symbol visibility, using something like: import sys, DLFCN sys.setdlopenflags(DLFCN.RTLD_NOW | DLFCN.RTLD_GLOBAL) import sollya See dlopen(3) for more information. - Using sagesollya from plain Python Import sage.all _before_ importing sagesollya. - In python2 sollya can not execute unbounded methods properly. CREDITS: - The logo in misc/logo.svg is based on that of Sollya (used with permission) and that [1] of SymPy (created by Fredrik Johansson and used under the terms of the SymPy license, see misc/sympy_license.txt). [1] https://github.com/sympy/sympy/blob/master/doc/src/logo/sympy.svg