forked from deepsense-ai/roi-pooling
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
32 lines (23 loc) · 781 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
#!/usr/bin/env python
from __future__ import print_function
from distutils.core import setup
from distutils.command.install import install as DistutilsInstall
import sys
import subprocess
try:
import tensorflow
except ImportError:
print("Please install tensorflow 0.12.0 or later")
sys.exit()
class MyInstall(DistutilsInstall):
def run(self):
subprocess.call(['make', '-C', 'roi_pooling', 'build'])
DistutilsInstall.run(self)
setup(name='roi-pooling',
version='1.0',
description='ROI pooling as a custom TensorFlow operation',
author='deepsense.io',
packages=['roi_pooling'],
package_data={'roi_pooling': ['roi_pooling.so']},
cmdclass={'install': MyInstall}
)