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