-
Notifications
You must be signed in to change notification settings - Fork 3
/
setup.py
41 lines (36 loc) · 1.72 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
import os
import numpy
from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
DEPS_FOLDER = 'dependencies'
ANALYZERS_FOLDER = 'analyzers'
ext_modules=[
Extension("SaleaeDevice",
sources = ["SaleaeDevice.pyx"],
language="c++", # this causes Pyrex/Cython to create C++ source
include_dirs = [os.path.join(os.getcwd(), DEPS_FOLDER), numpy.get_include()], # path to .h file(s)
library_dirs = [os.path.join(os.getcwd(), DEPS_FOLDER)], # path to library
extra_compile_args = ["/D", "WIN32", "/EHsc"],
libraries = ['SaleaeDevice'],
),
Extension("analyzer",
sources = ["analyzer.pyx"],
language="c++", # this causes Pyrex/Cython to create C++ source
include_dirs = [os.path.join(os.getcwd(), DEPS_FOLDER), numpy.get_include()], # path to .h file(s)
library_dirs = [os.path.join(os.getcwd(), DEPS_FOLDER)], # path to library
extra_compile_args = ["/D", "WIN32", "/EHsc"],
),
Extension("square_wave_analyzer",
sources = [ANALYZERS_FOLDER + os.path.sep + "square_wave_analyzer.pyx"],
language="c++", # this causes Pyrex/Cython to create C++ source
include_dirs = [os.path.join(os.getcwd(), DEPS_FOLDER), numpy.get_include()], # path to .h file(s)
library_dirs = [os.path.join(os.getcwd(), DEPS_FOLDER)], # path to library
extra_compile_args = ["/D", "WIN32", "/EHsc"],
),
]
setup(
name = 'pySaleae',
cmdclass = {'build_ext': build_ext},
ext_modules = ext_modules,
)