forked from danielfrg/tsne
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
47 lines (42 loc) · 1.63 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
# encoding: utf-8
import numpy
from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
import sys
DESCRIPTION = 'TSNE implementations for python'
if sys.platform == 'darwin':
ext_modules = [Extension(
name='bh_sne',
sources=['tsne/bh_sne_src/quadtree.cpp', 'tsne/bh_sne_src/tsne.cpp', 'tsne/bh_sne.pyx'],
include_dirs=[numpy.get_include(), 'tsne/bh_sne_src/'],
extra_compile_args=['-I/System/Library/Frameworks/vecLib.framework/Headers'],
extra_link_args=['-Wl,-framework', '-Wl,Accelerate', '-lcblas'],
language='c++')]
else:
ext_modules = [Extension(
name='bh_sne',
sources=['tsne/bh_sne_src/quadtree.cpp', 'tsne/bh_sne_src/tsne.cpp', 'tsne/bh_sne.pyx'],
include_dirs=[numpy.get_include(), '/usr/local/include', 'tsne/bh_sne_src/'],
library_dirs=['/usr/local/lib'],
extra_compile_args=['-msse2', '-O3', '-fPIC', '-w'],
extra_link_args=['-lcblas'],
language='c++')]
setup(
name='tsne',
version='0.1',
maintainer='Daniel Rodriguez',
maintainer_email='df.rodriguez143@gmail.com',
url='https://github.com/danielfrg/py_tsne',
packages=['tsne'],
ext_modules=ext_modules,
description=DESCRIPTION,
license='see LICENCE.txt',
cmdclass={'build_ext': build_ext},
long_description=open('README.txt').read(),
install_requires=[
'Cython>=0.19.1',
'numpy>=1.7.1',
'scipy>=0.12.0'
],
)