File: setup.py

package info (click to toggle)
zope-textindexng2 1%3A2.2.0-5
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 2,888 kB
  • ctags: 1,598
  • sloc: ansic: 6,836; python: 6,596; xml: 185; makefile: 137; sh: 41
file content (75 lines) | stat: -rw-r--r-- 2,167 bytes parent folder | download
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/usr/bin/env python

###########################################################################
#
# TextIndexNG                The next generation TextIndex for Zope
#
# This software is governed by a license. See
# LICENSE.txt for the terms of this license.
#
###########################################################################

from distutils.core import setup,Extension

import sys

if sys.maxunicode>0xffff:
    unicode_arg = "-DUNICODE_WIDTH=4"
else:
    unicode_arg = "-DUNICODE_WIDTH=2"


print unicode_arg
    
setup(name = "TextIndexNGExtensions",
      version = "2.02",
      author = "Andreas Jung",
      author_email = "andreas@andreas-jung.com",
      description = "Helper modules for TextIndexNG2: Splitter, normalizer",
      url = "http://www.zope.org/Members/ajung/TextIndexNG",
          ext_modules=[

            Extension("normalizer",
                [ "src/normalizer/normalizer.c" ],
            ),

            Extension("TXNGSplitter",
                [ "src/TXNGSplitter/TXNGSplitter.c",
                  "src/TXNGSplitter/hashtable.c",
                  "src/TXNGSplitter/dict.c" 
                ],
            ),


            Extension("indexsupport",
                [ "src/indexsupport.c" ],
            ),

        ]
        )


if sys.platform != "win32":
    ext_args = ['-Wall', '-O2']
else:
    ext_args = []

extLevensthein = Extension('Levenshtein',
                           sources = ['src/python-Levenshtein-0.10/Levenshtein.c'],
                           extra_compile_args=ext_args)

setup (name = 'python-Levenshtein',
       version = '0.10',
       description = 'Python extension computing string distances and similarities.',
       author = 'David Necas (Yeti)',
       author_email = 'yeti@physics.muni.cz',
       license = 'GNU GPL',
       url = 'http://trific.ath.cx/python/levenshtein/',
       long_description = '''
Levenshtein computes Levenshtein distances, similarity ratios, generalized
medians and set medians of Strings and Unicodes.  Because it's implemented
in C, it's much faster than corresponding Python library functions and
methods.
''',
       ext_modules = [extLevensthein])