6405.1.5
by Holger Rapp
Added rich text renderer with tests. Already linked into Widelands, but not yet used |
1 |
Howto build cython code with Scons |
2 |
================================== |
|
3 |
||
4 |
Quickstart |
|
5 |
---------- |
|
6 |
||
7 |
My own entry points was [1]. Copy this directory into your project under:: |
|
8 |
||
9 |
project_root/site_scons/site_tools/ |
|
10 |
||
11 |
Now add to your top level SConscript:: |
|
12 |
||
13 |
env = Environment(PYEXT_USE_DISTUTILS=True) |
|
14 |
||
15 |
env.Tool("pyext") |
|
16 |
env.Tool("cython") |
|
17 |
||
18 |
You can now build Cython Extensions using the PythonExtension builder:: |
|
19 |
||
20 |
env.PythonExtension("blah", ["blah.pyx"]) |
|
21 |
||
22 |
The builder is aware of cython dependencies residing in the search paths |
|
23 |
given by CYTHONPATH. Dependency tracking is then automatically done by scons. |
|
24 |
||
25 |
[1] http://www.mail-archive.com/cython-dev@codespeak.net/msg09540.html |
|
26 |
||
27 |
Configuration |
|
28 |
------------- |
|
29 |
||
30 |
The builders define some configuration variables which you can set like so:: |
|
31 |
||
32 |
env.Append(CYTHONPATH = ["thisdirectory"]) # add a directory to cythons search path |
|
33 |
||
34 |
Have a look at cython.py and pyext.py for finding them. |
|
35 |
||
36 |
||
37 |
||
38 |
-- vim:ft=rst |