-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsetup.py
More file actions
executable file
·58 lines (50 loc) · 1.73 KB
/
setup.py
File metadata and controls
executable file
·58 lines (50 loc) · 1.73 KB
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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
from distutils.extension import Extension
from distutils.sysconfig import *
from distutils.util import *
from Cython.Distutils import build_ext
import numpy
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
sys.exit()
readme = open('README.rst').read()
history = open('HISTORY.rst').read().replace('.. :changelog:', '')
py_inc = [get_python_inc()]
np_lib = os.path.dirname(numpy.__file__)
np_inc = [os.path.join(np_lib, 'core/include')]
setup(
name='cdtw',
version='0.1.2',
description='Fast, inflexible dtw in python/cython.',
long_description=readme + '\n\n' + history,
author='Maarten Versteegh',
author_email='maartenversteegh@gmail.com',
url='https://github.com/mwv/cdtw',
install_requires=['numpy'],
license="GPLv3",
zip_safe=False,
keywords='cdtw',
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Intended Audience :: Developers',
'Natural Language :: English',
"Programming Language :: Python :: 2",
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
],
cmdclass={'build_ext': build_ext},
ext_modules=[Extension('cdtw', ['src/cdtw.pyx'],
include_dirs=py_inc + np_inc,)],
# extra_compile_args=["-O3 -shared -pthread -fPIC"
# "-fwrapv -Wall "
# "-fno-strict-aliasing"])],
include_dirs=[numpy.get_include(),
os.path.join(numpy.get_include(), 'numpy')]
)