From 72e46b00edf847b9bd4b6299788586ea57da037c Mon Sep 17 00:00:00 2001 From: armatthews Date: Sun, 18 May 2014 17:22:56 -0400 Subject: Added information on how to recompile pycdec from the pyx files --- python/README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/python/README.md b/python/README.md index 37c7b78e..2cc77037 100644 --- a/python/README.md +++ b/python/README.md @@ -8,6 +8,13 @@ Build and install pycdec: Alternatively, run `python setup.py build_ext --inplace` and add the `python/` directory to your `PYTHONPATH`. +To re-build pycdec from the cython source, modify setup.py in the following ways: + * Add this input statement: from Cython.Build import cythonize + * Change the source file from cdec/\_cdec.cpp to cdec/\_cdec.pyx + * Add language='c++' as a property to ext\_modules (e.g. right after extra\_link\_args) + * In the final setup block, change ext\_modules=ext\_modules to ext\_modules=cythonize(ext\_modules) +Then just build and install normally, as described above. + ## Grammar extractor Compile a parallel corpus and a word alignment into a suffix array representation: -- cgit v1.2.3