setup.py 1.51 KB
Newer Older
1
from setuptools import setup
2 3 4 5 6
import os
import sys

from distutils.core import Extension

7
version = '0.12.0'
8

9 10
extLevensthein = Extension('Levenshtein._levenshtein',
                           sources = ['Levenshtein/_levenshtein.c'],
11 12
                           )

13 14 15 16
if sys.version_info >= (3, 0):
    _open = lambda f: open(f, encoding='utf8')
else:
    _open = open
17

18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
setup(name='python-Levenshtein',
      version=version,
      description="Python extension for computing string edit distances and similarities.",
      long_description=_open("README.rst").read() + "\n" +
                       _open(os.path.join("HISTORY.txt")).read(),
      # Get more strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
      classifiers=[
        "License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)",
        "Programming Language :: Python",
        "Programming Language :: Python :: 2",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: Implementation :: CPython"
        ],
      keywords='string Levenshtein comparison edit-distance',
      author='Antti Haapala',
      author_email='antti@haapala.name',
      url='http://github.com/ztane/python-Levenshtein',
      license='GPL',
36
      packages=['Levenshtein'],
37 38 39 40 41 42 43 44 45 46 47
      namespace_packages=[],
      include_package_data=True,
      zip_safe=False,
      ext_modules = [extLevensthein],
      install_requires=[
          'setuptools',
          # -*- Extra requirements: -*-
      ],
      entry_points="""
      """,
      )