-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.py
39 lines (36 loc) · 1.15 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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup #, find_packages
from setuptools.extension import Extension
# from distutils.core import setup
# from distutils.extension import Extension
from Cython.Build import cythonize
import numpy as np
# See details on Cython setuptools setup.py:
# https://stackoverflow.com/questions/32528560/using-setuptools-to-create-a-cython-package-calling-an-external-c-library
# See details on Cython distutils setup.py:
# https://cython.readthedocs.io/en/latest/src/userguide/source_files_and_compilation.html
#
# Compilation: $ python setup.py build_ext --inplace
extensions = [
Extension(
'similarities',
['similarities.pyx'],
# "myPackage.myModule",
# ["myPackage/myModule.pyx"],
include_dirs=[np.get_include()],
libraries=['m'], # libc
# library_dirs=[]
)
]
setup(
setup_requires=[
'cython>=0.21',
],
# name = "similarities",
# packages = find_packages(),
# ext_modules = cythonize("src/*.pyx", include_path=[...]),
# ext_modules = cythonize("similarities.pyx", include_path=[np.get_include()]),
# cmdclass={'build_ext': Cython.Build.build_ext},
ext_modules = cythonize(extensions)
)