annotate python/pydc/README.txt @ 15:1673ab696715

- erlang binding ToDo update in readme
author cslag
date Sat, 26 Mar 2016 16:09:41 +0100
parents 6493c9ed4b33
children a40084782546
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
1 dyncall python bindings
5
bf5625bb6f05 - brought python binding up to dc v0.9
cslag
parents: 4
diff changeset
2 (C) 2007-2016 Daniel Adler.
bf5625bb6f05 - brought python binding up to dc v0.9
cslag
parents: 4
diff changeset
3 Dec 4, 2007: initial
bf5625bb6f05 - brought python binding up to dc v0.9
cslag
parents: 4
diff changeset
4 Mar 22,2016: brought up to dyncall 0.9
bf5625bb6f05 - brought python binding up to dc v0.9
cslag
parents: 4
diff changeset
5
0
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
6
7
4fd959b3df78 - python binding readme clarifications
cslag
parents: 5
diff changeset
7 BUILD/INSTALLATION
4fd959b3df78 - python binding readme clarifications
cslag
parents: 5
diff changeset
8 ------------------
4
4c5019f00f5b - python binding cleanup
cslag
parents: 0
diff changeset
9
4c5019f00f5b - python binding cleanup
cslag
parents: 0
diff changeset
10 1) make sure dyncall is built and libraries/headers are in include paths or
4c5019f00f5b - python binding cleanup
cslag
parents: 0
diff changeset
11 CFLAGS points to them, etc.
4c5019f00f5b - python binding cleanup
cslag
parents: 0
diff changeset
12
10
6493c9ed4b33 - ruby and python binding readme updates
cslag
parents: 7
diff changeset
13 2) Build and install this extension with:
7
4fd959b3df78 - python binding readme clarifications
cslag
parents: 5
diff changeset
14 python setup.py install
4
4c5019f00f5b - python binding cleanup
cslag
parents: 0
diff changeset
15
4c5019f00f5b - python binding cleanup
cslag
parents: 0
diff changeset
16
0
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
17 API
4
4c5019f00f5b - python binding cleanup
cslag
parents: 0
diff changeset
18 ---
0
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
19
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
20 libhandle = load(libpath)
5
bf5625bb6f05 - brought python binding up to dc v0.9
cslag
parents: 4
diff changeset
21 funcptr = find(libhandle, symbolname)
bf5625bb6f05 - brought python binding up to dc v0.9
cslag
parents: 4
diff changeset
22 call(funcptr, signature, ...)
0
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
23
7
4fd959b3df78 - python binding readme clarifications
cslag
parents: 5
diff changeset
24
0
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
25 SIGNATURE FORMAT
7
4fd959b3df78 - python binding readme clarifications
cslag
parents: 5
diff changeset
26 ----------------
0
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
27
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
28 is a formated string
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
29
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
30 format: "xxxxx)y"
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
31
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
32 x is positional parameter-type charcode
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
33
5
bf5625bb6f05 - brought python binding up to dc v0.9
cslag
parents: 4
diff changeset
34 'B' C++: bool <- Python: PyBool
bf5625bb6f05 - brought python binding up to dc v0.9
cslag
parents: 4
diff changeset
35 'c' C: char <- Python: PyInt (range checked)
bf5625bb6f05 - brought python binding up to dc v0.9
cslag
parents: 4
diff changeset
36 's' C: short <- Python: PyInt (range checked)
0
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
37 'i' C: int <- Python: PyInt
5
bf5625bb6f05 - brought python binding up to dc v0.9
cslag
parents: 4
diff changeset
38 'j' C: long <- Python: PyLong
0
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
39 'l' C: long long <- Python: PyLongLong
5
bf5625bb6f05 - brought python binding up to dc v0.9
cslag
parents: 4
diff changeset
40 'f' C: float <- Python: PyFloat (cast to single precision)
bf5625bb6f05 - brought python binding up to dc v0.9
cslag
parents: 4
diff changeset
41 'd' C: double <- Python: PyFloat
0
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
42 'p' C: void* <- Python: PyCObject
5
bf5625bb6f05 - brought python binding up to dc v0.9
cslag
parents: 4
diff changeset
43 'Z' C: const char* <- Python: PyString
0
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
44
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
45 y is result-type charcode
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
46
7
4fd959b3df78 - python binding readme clarifications
cslag
parents: 5
diff changeset
47 'v' C: void
4fd959b3df78 - python binding readme clarifications
cslag
parents: 5
diff changeset
48 'B' C++: bool -> Python: PyBool
4fd959b3df78 - python binding readme clarifications
cslag
parents: 5
diff changeset
49 'c' C: char -> Python: PyInt
4fd959b3df78 - python binding readme clarifications
cslag
parents: 5
diff changeset
50 's' C: short -> Python: PyInt
4fd959b3df78 - python binding readme clarifications
cslag
parents: 5
diff changeset
51 'i' C: int -> Python: PyInt
4fd959b3df78 - python binding readme clarifications
cslag
parents: 5
diff changeset
52 'j' C: long -> Python: PyLong
4fd959b3df78 - python binding readme clarifications
cslag
parents: 5
diff changeset
53 'l' C: long long -> Python: PyLongLong
4fd959b3df78 - python binding readme clarifications
cslag
parents: 5
diff changeset
54 'f' C: float -> Python: PyFloat (cast to double precision)
4fd959b3df78 - python binding readme clarifications
cslag
parents: 5
diff changeset
55 'd' C: double -> Python: PyFloat
4fd959b3df78 - python binding readme clarifications
cslag
parents: 5
diff changeset
56 'p' C: ptr -> Python: PyCObject encapsulating a void*
4fd959b3df78 - python binding readme clarifications
cslag
parents: 5
diff changeset
57 'Z' C: const char* -> Python: PyString
5
bf5625bb6f05 - brought python binding up to dc v0.9
cslag
parents: 4
diff changeset
58
0
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
59
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
60 BUGS
4
4c5019f00f5b - python binding cleanup
cslag
parents: 0
diff changeset
61 ----
0
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
62
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
63 * build on osx/ppc - link error i386 something... [MacPython 2.4]
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
64
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
65 solution:
4
4c5019f00f5b - python binding cleanup
cslag
parents: 0
diff changeset
66 installation of latest python for os x (MacPython 2.5)
0
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
67
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
68 build log:
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
69
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
70 python setup.py install
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
71 running install
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
72 running build
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
73 running build_py
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
74 creating build
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
75 creating build/lib.macosx-10.3-fat-2.4
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
76 copying pydc.py -> build/lib.macosx-10.3-fat-2.4
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
77 running build_ext
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
78 building 'pydcext' extension
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
79 creating build/temp.macosx-10.3-fat-2.4
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
80 gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -I../../../dyncall -I../../../dynload -I/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4 -c pydcext.c -o build/temp.macosx-10.3-fat-2.4/pydcext.o
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
81 gcc -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g -bundle -undefined dynamic_lookup build/temp.macosx-10.3-fat-2.4/pydcext.o -L../../../dyncall -L../../../dynload -ldyncall_s -ldynload_s -lstdc++ -o build/lib.macosx-10.3-fat-2.4/pydcext.so
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
82 /usr/bin/ld: for architecture i386
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
83 /usr/bin/ld: warning ../../../dyncall/libdyncall_s.a archive's cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (can't load from it)
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
84 /usr/bin/ld: warning ../../../dynload/libdynload_s.a archive's cputype (18, architecture ppc) does not match cputype (7) for specified -arch flag: i386 (can't load from it)
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
85 running install_lib
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
86 copying build/lib.macosx-10.3-fat-2.4/pydcext.so -> /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages
0cfcc391201f initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
87