1 | For binary distributions remember to set the environment vraiable |
---|
2 | PYTHONPATH to the directories containing the Singular python modules |
---|
3 | (interpreter.py, utils.py, usually the Singular LIB directory) |
---|
4 | and to your python directory (usually .) |
---|
5 | |
---|
6 | Example for bash etc.: |
---|
7 | export PYTHONPATH=".:/usr/local/Singular/3-0-2/LIB" |
---|
8 | |
---|
9 | Requirements for building: |
---|
10 | -------------------------- |
---|
11 | install scons (the build tool) |
---|
12 | install boost::python |
---|
13 | install boost |
---|
14 | dynamic modules working |
---|
15 | have a working Singular build directory |
---|
16 | NOSTREAMIO disabled in factory (rebuild also claptmpl.o in Singular) |
---|
17 | install python-numeric (for matrix report) |
---|
18 | |
---|
19 | Suggested additional modules: |
---|
20 | probstat: fast (C-Impl.) combinatorics (permutations, cartesian products) |
---|
21 | lxml for openmath |
---|
22 | |
---|
23 | |
---|
24 | supported interpreter values: |
---|
25 | |
---|
26 | INPUT: |
---|
27 | int |
---|
28 | poly |
---|
29 | vector |
---|
30 | number |
---|
31 | matrix |
---|
32 | ideal |
---|
33 | list |
---|
34 | string |
---|
35 | ring |
---|
36 | intvec |
---|
37 | |
---|
38 | Output: |
---|
39 | int |
---|
40 | poly |
---|
41 | vector |
---|
42 | number |
---|
43 | matrix |
---|
44 | ideal |
---|
45 | list |
---|
46 | string |
---|
47 | ring |
---|
48 | intvec |
---|
49 | |
---|
50 | typemappings: |
---|
51 | interpreter, python internal, python official name |
---|
52 | int -> int |
---|
53 | poly -> Poly ->Polynomial |
---|
54 | vector -> Vector -> Vector |
---|
55 | number -> Number ->Number |
---|
56 | matrix -> Numeric.array |
---|
57 | ideal -> Ideal ->Ideal |
---|
58 | list -> list |
---|
59 | string -> str |
---|
60 | ring -> ring(in a Ring, but this does nothing) ->ring |
---|
61 | BUILD: |
---|
62 | -------- |
---|
63 | just type: |
---|
64 | scons |
---|
65 | |
---|
66 | adjust PYTHONPATH: |
---|
67 | ----------------- |
---|
68 | python must be able to find interpreter.py |
---|
69 | so either |
---|
70 | export PYTHONPATH="<singroot>/modules/python" |
---|
71 | but |
---|
72 | for me simply |
---|
73 | export PYTHONPATH= |
---|
74 | also works |
---|
75 | |
---|
76 | Test: |
---|
77 | ----- |
---|
78 | ../../Singular/Singular <testfile> |
---|
79 | where testfile is in |
---|
80 | powertester |
---|
81 | polytester interpretertester |
---|
82 | if an exceptions occurs, review the code it may be wanted for examples the last line in interpretertester |
---|
83 | |
---|
84 | TASKS: |
---|
85 | ------ |
---|
86 | - push and pop rings, automatically change rings, if Singular functions are executed |
---|
87 | -Map more types |
---|
88 | -throw Python exception if something fails |
---|
89 | -testing |
---|
90 | -write some module presenting the power of python |
---|
91 | compared to the Singular interpreter language |
---|
92 | - make modgen work properly |
---|
93 | - make the functionality available build in the kernel for the windows platform |
---|
94 | - documentation |
---|
95 | - provide feedback for missing functionality |
---|
96 | -smart pointer for ring in Poly |
---|
97 | |
---|
98 | RULES: |
---|
99 | ----- |
---|
100 | |
---|
101 | If you want to help, which would make me happy, follow some simple rules: |
---|
102 | |
---|
103 | - divide the work in layers, so what is a problem of a better C++-Interface should be done in the Singular kernel (compare Number.h, Poly.h PowerSeries.h), the Pythonwrapper itself should be ultrathin |
---|
104 | -raw operations (+,-,* creation of res...) should map directly to the Singular kernel (prefereable nice C++ wrapper classes in the kernel) |
---|
105 | - Wrapper classes in C++ should behave like canonical C++-Classes, no additional res.-management (with the exception of new, delete) should be required |
---|
106 | - never use currRing implicitely, always write out the currRing argument, if this isn't done consequently in my code, it would be nice of you to fix it |
---|
107 | - regularly check in, check out from CVS |
---|
108 | |
---|
109 | |
---|
110 | NEWS: |
---|
111 | *global_functions has be renamed to singular_globals_proxy |
---|
112 | the old name exists for short time for compat. |
---|
113 | |
---|
114 | *it is now possible to use the singular_globals_proxy for |
---|
115 | -reading global variables |
---|
116 | -writing global variables, if the var exists with the correct type in the interpreter |
---|
117 | -calling global interpreter and builtin functions (not builtins, for example groebner but not std |
---|
118 | |
---|
119 | successfully tested systems: |
---|
120 | linux: x86, x86_64 |
---|
121 | Mac OS X:G4, |
---|
122 | windows (ask Oliver) |
---|
123 | |
---|
124 | |
---|
125 | |
---|
126 | |
---|
127 | |
---|