-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
103 lines (67 loc) · 3.48 KB
/
Copy pathREADME
File metadata and controls
103 lines (67 loc) · 3.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
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