forked from thtrieu/darkflow
-
Notifications
You must be signed in to change notification settings - Fork 37
/
setup.py
74 lines (69 loc) · 2.51 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
from setuptools import setup, find_packages
from setuptools.extension import Extension
from Cython.Build import cythonize
import numpy
import os
import imp
VERSION = imp.load_source('version', os.path.join('.', 'darkflow', 'version.py'))
VERSION = VERSION.__version__
if os.name =='nt' :
ext_modules=[
Extension("darkflow.cython_utils.nms",
sources=["darkflow/cython_utils/nms.pyx"],
#libraries=["m"] # Unix-like specific
include_dirs=[numpy.get_include()]
),
Extension("darkflow.cython_utils.cy_yolo2_findboxes",
sources=["darkflow/cython_utils/cy_yolo2_findboxes.pyx"],
#libraries=["m"] # Unix-like specific
include_dirs=[numpy.get_include()]
),
Extension("darkflow.cython_utils.cy_yolo_findboxes",
sources=["darkflow/cython_utils/cy_yolo_findboxes.pyx"],
#libraries=["m"] # Unix-like specific
include_dirs=[numpy.get_include()]
)
]
elif os.name =='posix' :
ext_modules=[
Extension("darkflow.cython_utils.nms",
sources=["darkflow/cython_utils/nms.pyx"],
libraries=["m"], # Unix-like specific
include_dirs=[numpy.get_include()]
),
Extension("darkflow.cython_utils.cy_yolo2_findboxes",
sources=["darkflow/cython_utils/cy_yolo2_findboxes.pyx"],
libraries=["m"], # Unix-like specific
include_dirs=[numpy.get_include()]
),
Extension("darkflow.cython_utils.cy_yolo_findboxes",
sources=["darkflow/cython_utils/cy_yolo_findboxes.pyx"],
libraries=["m"], # Unix-like specific
include_dirs=[numpy.get_include()]
)
]
else :
ext_modules=[
Extension("darkflow.cython_utils.nms",
sources=["darkflow/cython_utils/nms.pyx"],
libraries=["m"] # Unix-like specific
),
Extension("darkflow.cython_utils.cy_yolo2_findboxes",
sources=["darkflow/cython_utils/cy_yolo2_findboxes.pyx"],
libraries=["m"] # Unix-like specific
),
Extension("darkflow.cython_utils.cy_yolo_findboxes",
sources=["darkflow/cython_utils/cy_yolo_findboxes.pyx"],
libraries=["m"] # Unix-like specific
)
]
setup(
version=VERSION,
name='darkflow',
description='Darkflow',
license='GPLv3',
url='https://github.com/thtrieu/darkflow',
packages = find_packages(),
scripts = ['flow'],
ext_modules = cythonize(ext_modules)
)