-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathsetup.py
30 lines (27 loc) · 961 Bytes
/
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
from setuptools import setup
from distutils.extension import Extension
from setuptools import find_packages
from Cython.Build import cythonize
import numpy
import platform
link_args = ['-O2']
if platform.system() == 'Darwin':
link_args = ['-Wl,-framework', '-Wl,Accelerate', '-lcblas']
extensions = [
Extension("bhtsne_wrapper",
['bhtsne_wrapper.pyx', 'src/tsne.cpp', 'src/sptree.cpp'],
include_dirs=[numpy.get_include(), 'src'],
extra_link_args=link_args,
extra_compile_flags=['-I/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/Headers'],
language='c++'
)
]
setup(
name="bhtsne",
version="0.1.9",
description='Python module for Barnes-Hut implementation of t-SNE (Cython)',
url='https://github.com/dominiek/python-bhtsne',
ext_modules=cythonize(extensions),
packages=find_packages(),
install_requires=['numpy', 'cython']
)