2013-11-01 22:34:18 +00:00
|
|
|
#!/usr/bin/env python
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
|
|
|
import os
|
|
|
|
import sys
|
|
|
|
|
2014-04-12 10:10:52 +00:00
|
|
|
from distutils.core import setup, Extension
|
|
|
|
|
2013-11-01 22:34:18 +00:00
|
|
|
|
|
|
|
if sys.argv[-1] == 'publish':
|
|
|
|
os.system('python setup.py sdist upload')
|
|
|
|
sys.exit()
|
|
|
|
|
2014-04-12 10:10:52 +00:00
|
|
|
os.chdir(os.path.dirname(os.path.abspath(__file__)))
|
2013-11-01 22:34:18 +00:00
|
|
|
readme = open('README.rst').read()
|
|
|
|
history = open('HISTORY.rst').read().replace('.. :changelog:', '')
|
|
|
|
|
2014-04-12 10:10:52 +00:00
|
|
|
_substitutions_only_module = Extension(
|
|
|
|
'fuzzysearch._substitutions_only',
|
2014-05-10 23:37:32 +00:00
|
|
|
sources=['fuzzysearch/_substitutions_only.c', 'fuzzysearch/kmp.c'],
|
|
|
|
include_dirs=['.'],
|
2014-04-12 10:10:52 +00:00
|
|
|
)
|
2014-04-18 22:31:32 +00:00
|
|
|
_common_module = Extension(
|
|
|
|
'fuzzysearch._common',
|
2014-05-10 23:32:13 +00:00
|
|
|
sources=['fuzzysearch/_common.c', 'fuzzysearch/kmp.c'],
|
|
|
|
include_dirs=['.'],
|
2014-04-18 22:31:32 +00:00
|
|
|
)
|
2014-04-12 10:10:52 +00:00
|
|
|
_generic_search_module = Extension(
|
|
|
|
'fuzzysearch._generic_search',
|
2014-05-10 23:40:14 +00:00
|
|
|
sources=['fuzzysearch/_generic_search.c', 'fuzzysearch/kmp.c'],
|
|
|
|
include_dirs=['.'],
|
2014-04-12 10:10:52 +00:00
|
|
|
)
|
|
|
|
|
2013-11-01 22:34:18 +00:00
|
|
|
setup(
|
|
|
|
name='fuzzysearch',
|
2014-03-27 13:36:43 +00:00
|
|
|
version='0.2.2',
|
2013-11-01 22:34:18 +00:00
|
|
|
description='fuzzysearch is useful for finding approximate subsequence matches',
|
|
|
|
long_description=readme + '\n\n' + history,
|
|
|
|
author='Tal Einat',
|
|
|
|
author_email='taleinat@gmail.com',
|
|
|
|
url='https://github.com/taleinat/fuzzysearch',
|
|
|
|
packages=[
|
|
|
|
'fuzzysearch',
|
|
|
|
],
|
|
|
|
package_dir={'fuzzysearch': 'fuzzysearch'},
|
2014-04-18 22:31:32 +00:00
|
|
|
ext_modules=[_substitutions_only_module, _common_module, _generic_search_module],
|
2013-11-01 22:34:18 +00:00
|
|
|
license="MIT",
|
|
|
|
keywords='fuzzysearch',
|
|
|
|
classifiers=[
|
2013-11-12 08:58:41 +00:00
|
|
|
'Development Status :: 3 - Alpha',
|
2013-11-01 22:34:18 +00:00
|
|
|
'Intended Audience :: Developers',
|
|
|
|
'License :: OSI Approved :: MIT License',
|
|
|
|
'Natural Language :: English',
|
|
|
|
"Programming Language :: Python :: 2",
|
|
|
|
'Programming Language :: Python :: 2.6',
|
|
|
|
'Programming Language :: Python :: 2.7',
|
|
|
|
'Programming Language :: Python :: 3',
|
|
|
|
'Programming Language :: Python :: 3.2',
|
|
|
|
'Programming Language :: Python :: 3.3',
|
|
|
|
],
|
2014-04-20 10:40:55 +00:00
|
|
|
)
|