~shevonar/widelands/reworking-menus

« back to all changes in this revision

Viewing changes to test/richtext/site_scons/site_tools/README_cython.txt

  • Committer: Shevonar
  • Date: 2013-01-15 23:15:22 UTC
  • mfrom: (6432.1.56 trunk)
  • Revision ID: infomh@anmaruco.de-20130115231522-782njbcagjo6olef
mergedĀ currentĀ trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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