forked from SamsungLabs/FastFlow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
54 lines (46 loc) · 1.73 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
import os
import fnmatch
from pathlib import Path
import pkg_resources
from grpc_tools import protoc
from setuptools import setup, find_packages
def find_files(pattern, root):
"""Return all the files matching pattern below root dir."""
for dirpath, _, files in os.walk(root):
for filename in fnmatch.filter(files, pattern):
yield os.path.join(dirpath, filename)
_VERSION = '0.0.1'
with open("requirements.txt") as requirements_file:
REQUIRED_PACKAGES = requirements_file.read() \
.split('\n\n')[0] \
.split('\n')[1:]
_proto_include = pkg_resources.resource_filename('grpc_tools', '_proto')
_protobufs_path = \
Path(__file__).absolute().parent / "fastflow/autoscaler/protobufs"
_framework_path = \
Path(__file__).absolute().parent / "fastflow/autoscaler/framework/grpc"
protoc.main([protoc.__file__,
"-I{}".format(_protobufs_path),
"--python_out={}".format(_framework_path)] +
list(find_files("*.proto", _protobufs_path)) +
["-I{}".format(_proto_include)])
setup(
name='fastflow',
version=_VERSION,
description='fastflow',
author='Samsung Research',
url='https://github.com/SamsungLabs/FastFlow',
install_requires=REQUIRED_PACKAGES,
packages=find_packages(include=['fastflow*']),
keywords=['fastflow', 'tensorflow', 'offloading'],
python_requires='>=3.7',
include_package_data=True,
zip_safe=False,
classifiers=[
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3 :: Only',
],
)