1 from distutils.core import setup 2 from distutils.extension import Extension 3 from Cython.Distutils import build_ext 4 5 setup( 6 name='sunpinyin-python', 7 version='0.1', 8 author = "Yong Sun", 9 author_email = "Yong.Sun (at] Sun.COM", 10 url = "http://www.opensolaris.org/os/project/input-method", 11 description = "A Python binding of the SunPinyin ngram model", 12 long_description = "A Python binding of the SunPinyin ngram model", 13 license = "CDDL/LGPLv2.1", 14 15 ext_modules=[ 16 Extension( 17 "pyslm", ["pyslm.pyx", 18 "../src/slm/slm.cpp"], 19 language="c++", 20 include_dirs=["../src/slm", ".."], 21 define_macros=[("HAVE_CONFIG_H", None)] 22 ), 23 Extension( 24 "pytrie", ["pytrie.pyx", 25 "../src/portability.cpp", 26 "../src/lexicon/pytrie.cpp"], 27 language="c++", 28 include_dirs=["../src", "../src/lexicon", ".."], 29 define_macros=[("HAVE_CONFIG_H", None)] 30 ), 31 ], 32 cmdclass = {'build_ext': build_ext} 33 ) 34