1#!/usr/bin/env python 2 3import sys 4from distutils.core import setup, Extension 5 6classifiers = """\ 7Development Status :: 4 - Beta 8Intended Audience :: Developers 9License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL) 10Programming Language :: Python 11Programming Language :: C 12Topic :: Software Development :: Libraries :: Python Modules 13Operating System :: Microsoft :: Windows 14Operating System :: Unix 15""" 16 17if sys.platform == "win32": # for MinGW 18 include_dirs = [r'\MinGW\include', r'..\..\hangul'] 19 library_dirs = [r'\MinGW\lib', r'..\..\hangul'] 20 libraries = ['hangul'] 21 data_files = [] 22 23else: 24 include_dirs = [ '../../hangul' ] 25 library_dirs = [ '../../hangul/.libs' ] 26 libraries = ['hangul'] 27 data_files = [] 28 29if sys.version_info < (2, 3): 30 _setup = setup 31 def setup(**kwargs): 32 if kwargs.has_key("classifiers"): 33 del kwargs["classifiers"] 34 _setup(**kwargs) 35 36setup(name = "pyhangul", 37 version = "0.0.1", 38 description="libhangul for Python.", 39 author = "Joon-cheol Park", 40 author_email="jooncheol@gmail.com", 41 license = "LGPL", 42 url="http://hangul.kldp.net", 43 ext_modules=[Extension("hangul", ["pyhangul.c"], 44 include_dirs = include_dirs, 45 library_dirs = library_dirs, 46 libraries = libraries)], 47 classifiers = filter(None, classifiers.split("\n")), 48 data_files=data_files 49 ) 50 51