-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
71 lines (62 loc) · 1.98 KB
/
setup.py
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
from setuptools import setup, find_packages
from distutils.core import Extension
import os
from setuptools.command.test import test as TestCommand
import sys
install_requires = [
]
tests_require = [
'pytest >= 3.3.0',
'coverage',
]
class PyTest(TestCommand):
"""Allow running tests via python setup.py test."""
def finalize_options(self):
"""Test command magic."""
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
"""Run tests."""
import pytest
errcode = pytest.main(self.test_args)
sys.exit(errcode)
with open(os.path.join(os.path.abspath(os.path.dirname(__file__)), 'README.md'), encoding='utf-8') as f:
long_description = f.read()
setup(
name="nearmiss",
python_requires='>=3.9',
version="0.1.4",
packages=find_packages(exclude=["tests"]),
author='Simon Shaw',
author_email='[email protected]',
description='Fast inexact text searching with suffix arrays',
long_description=long_description,
long_description_content_type='text/markdown',
install_requires=install_requires,
tests_require=tests_require,
entry_points={},
cmdclass={'test': PyTest},
license='GPLv3+',
classifiers=[
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Development Status :: 3 - Alpha',
'Intended Audience :: Science/Research',
'Topic :: Scientific/Engineering :: Bio-Informatics',
'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)',
],
extras_require={
'testing': tests_require,
},
ext_modules=[
Extension('nearmiss._core',
sources=[
'source/sais.c',
'source/tree.c'
],
include_dirs=['source'],
extra_compile_args=["-fopenmp"],
extra_link_args=["-fopenmp"])
]
)