-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
64 lines (56 loc) · 2.08 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
"""Setup script for NodeTrie"""
from setuptools import setup, find_packages, Extension
import versioneer
try:
from Cython.Build import cythonize
except ImportError:
USING_CYTHON = False
else:
USING_CYTHON = True
ext = 'pyx' if USING_CYTHON else 'c'
extensions = [Extension("nodetrie.nodetrie",
["nodetrie/nodetrie.%s" % (ext,),
"nodetrie_c/src/node.c",],
depends=["nodetrie_c/src/node.h"],
include_dirs=["nodetrie_c/src"],
extra_compile_args=["-std=c99", "-O3"],
),
]
if USING_CYTHON:
extensions = cythonize(
extensions,
compiler_directives={'embedsignature': True,}
)
cmdclass = versioneer.get_cmdclass()
setup(
name='nodetrie',
version=versioneer.get_version(),
cmdclass=cmdclass,
url='https://github.com/NodeTrie/NodeTrie_Py',
license='LGPLv2',
author='Panos Kittenis',
author_email='[email protected]',
description=('Python bindings for NodeTrie, a trie data structure library'),
long_description=open('README.rst').read(),
packages=find_packages('.'),
zip_safe=False,
include_package_data=True,
platforms='any',
classifiers=[
'Intended Audience :: Developers',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Topic :: Scientific/Engineering :: Information Analysis',
'Topic :: Software Development :: Libraries',
'Topic :: Software Development :: Libraries :: Python Modules',
'License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)',
'License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2)',
],
ext_modules=extensions,
)