forked from sebastian-schlecht/tensorflow-serving-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
54 lines (43 loc) · 1.28 KB
/
Copy pathsetup.py
File metadata and controls
54 lines (43 loc) · 1.28 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
from setuptools import setup
from setuptools.command.install import install
from setuptools.command.develop import develop
import os
try:
from grpc.tools import command
except ImportError:
build_requires = ['grpcio-tools']
else:
build_requires = []
class PackgeProtoBuilderMixin(object):
def build_package_protos(self):
from grpc.tools import command
command.build_package_protos(self.distribution.package_dir[''])
class InstallWithProtos(install, PackgeProtoBuilderMixin):
def run(self):
self.build_package_protos()
install.run(self)
class DevelopWithProtos(develop, PackgeProtoBuilderMixin):
def run(self):
self.build_package_protos()
develop.run(self)
setup(
name='tensorflow_serving_python',
version='0.1',
description='Python client for tensorflow serving',
author="Sebastian Schlecht",
license="MIT",
packages=['tensorflow_serving_python', 'tensorflow_serving_python.protos',
'tensorflow_serving_python.tensor_utils'],
package_dir={'': 'src'},
setup_requires=build_requires,
install_requires=[
'cython',
'grpcio',
'grpcio-tools',
'numpy'
],
cmdclass={
'install': InstallWithProtos,
'develop': DevelopWithProtos,
}
)