forked from cyanut/pyximea
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
executable file
·55 lines (45 loc) · 1.35 KB
/
setup.py
File metadata and controls
executable file
·55 lines (45 loc) · 1.35 KB
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
47
48
49
50
51
52
53
54
55
from setuptools import setup, Distribution
import os, platform
import numpy
from distutils.core import setup
from distutils.extension import Extension
from Cython.Build import cythonize
lib_dirs=[]
if platform.system() == 'Darwin':
includes = [numpy.get_include()]
f = '-framework'
link_args = [f, 'm3api']
libs = []
elif platform.system() == 'Windows':
includes = [numpy.get_include(), r"C:\XIMEA\API"]
libs = ['m3apiX64']
lib_dirs=[r".\pyximea"]
link_args = []
print("windows")
else:
includes = [numpy.get_include(), r"/usr/include/m3api"]
link_args = []
libs = ["m3api"]
class BinaryDistribution(Distribution):
def has_ext_modules(foo):
return True
# extra_objects=["../build/libnanovg.a"]
extensions = [
Extension( name="pyximea.ximea",
sources=['pyximea/ximea.pyx'],
include_dirs = includes,
libraries = libs,
library_dirs=lib_dirs,
extra_link_args=link_args,
extra_compile_args=['-std=c99']
),
]
setup( name="pyximea",
version="0.0.2",
description="Ximea XiAPI Python Bindings",
ext_modules=cythonize(extensions),
url="https://github.com/cyanut/pyximea",
license="GPL",
packages=['pyximea'],
package_data ={'pyximea': ['m3apiX64.dll']}
)