-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathsetup.py
37 lines (27 loc) · 940 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
31
32
33
34
35
36
37
from distutils.core import setup
from distutils.extension import Extension
USE_CYTHON = False
ext = '.pyx' if USE_CYTHON else '.c'
extensions = [Extension("pygigev",
["pygigev" + ext],
language="c",
include_dirs=["/usr/dalsa/GigeV/include/"],
libraries=["GevApi"],
)]
if USE_CYTHON:
from Cython.Build import cythonize
extensions = cythonize(extensions)
setup(
ext_modules = extensions
)
# from distutils.core import setup
# from distutils.extension import Extension
# USE_CYTHON = ... # command line option, try-import, ...
# ext = '.pyx' if USE_CYTHON else '.c'
# extensions = [Extension("example", ["example"+ext])]
# if USE_CYTHON:
# from Cython.Build import cythonize
# extensions = cythonize(extensions)
# setup(
# ext_modules = extensions
# )