MNN/pymnn/pip_package/setup.py

466 lines
20 KiB
Python
Raw Normal View History

# Copyright @ 2019 Alibaba. All rights reserved.
# Created by ruhuan on 2019.08.31
""" setup tool """
from __future__ import print_function
2023-01-11 15:08:58 +08:00
import os
def get_version():
root_dir = os.getenv('PROJECT_ROOT', os.path.dirname(os.path.dirname(os.getcwd())))
version_header = os.path.join(root_dir, 'include/MNN/MNNDefine.h')
version_major = version_minor = version_patch = 'x'
for line in open(version_header, 'rt').readlines():
if '#define MNN_VERSION_MAJOR' in line:
version_major = int(line.strip().split(' ')[-1])
if '#define MNN_VERSION_MINOR' in line:
version_minor = int(line.strip().split(' ')[-1])
if '#define MNN_VERSION_PATCH' in line:
version_patch = int(line.strip().split(' ')[-1])
return '{}.{}.{}'.format(version_major, version_minor, version_patch)
2020-12-15 14:12:35 +08:00
import sys
2020-12-15 14:12:35 +08:00
import argparse
parser = argparse.ArgumentParser(description='build pymnn wheel')
parser.add_argument('--x86', dest='x86', action='store_true', default=False,
help='build wheel for 32bit arch, only usable on windows')
2023-01-11 15:08:58 +08:00
parser.add_argument('--version', dest='version', type=str, default=get_version(),
2020-12-15 14:12:35 +08:00
help='MNN dist version')
2022-02-18 11:30:27 +08:00
parser.add_argument('--serving', dest='serving', action='store_true', default=False,
help='build for internal serving, default False')
2023-12-04 11:12:20 +08:00
parser.add_argument('--deps', dest='deps', type=str, required=False,
help='MNN library deps')
2022-02-18 11:30:27 +08:00
parser.add_argument('--env', dest='env', type=str, required=False,
help='build environment, e.g. :daily/pre/production')
2020-12-15 14:12:35 +08:00
args, unknown = parser.parse_known_args()
sys.argv = [sys.argv[0]] + unknown
import platform
2020-07-04 01:21:30 +08:00
try:
import numpy as np
except:
print("import numpy failed")
from setuptools import setup, Extension, find_packages
from distutils import core
from distutils.core import Distribution
from distutils.errors import DistutilsArgError
IS_WINDOWS = (platform.system() == 'Windows')
IS_DARWIN = (platform.system() == 'Darwin')
IS_LINUX = (platform.system() == 'Linux')
2019-12-27 22:16:57 +08:00
BUILD_DIR = 'pymnn_build'
2022-02-18 11:30:27 +08:00
BUILD_TYPE = 'REL_WITH_DEB_INFO'
2020-11-06 11:05:52 +08:00
BUILD_ARCH = 'x64'
2020-12-15 14:12:35 +08:00
if args.x86:
2020-11-06 11:05:52 +08:00
BUILD_ARCH = ''
2020-11-05 16:41:56 +08:00
def check_env_flag(name, default=''):
""" check whether a env is set to Yes """
return os.getenv(name, default).upper() in ['ON', '1', 'YES', 'TRUE', 'Y']
def report(*args):
""" print information """
print(*args)
2020-11-05 16:41:56 +08:00
package_name = 'MNN'
2023-12-04 11:12:20 +08:00
USE_INTERNAL = False
USE_TRT = False
USE_CUDA = False
USE_OPENCL = False
USE_VULKAN = False
USE_RENDER = False
2020-11-05 16:41:56 +08:00
2023-12-04 11:12:20 +08:00
if args.deps != None:
if "trt" in args.deps:
USE_TRT = True
if "cuda" in args.deps:
USE_CUDA = True
if "opencl" in args.deps:
USE_OPENCL = True
if "vulkan" in args.deps:
USE_VULKAN = True
if "internal" in args.deps:
USE_INTERNAL = True
if "render" in args.deps:
USE_RENDER = True
2020-11-05 16:41:56 +08:00
2023-12-04 11:12:20 +08:00
print ("USE_INTERNAL:", USE_INTERNAL)
print ("USE_TRT:", USE_TRT)
print ("USE_CUDA:", USE_CUDA)
print ("USE_OPENCL:", USE_OPENCL)
print ("USE_VULKAN:", USE_VULKAN)
print ("USE_RENDER:", USE_RENDER)
if USE_INTERNAL:
package_name += '_Internal'
if USE_TRT:
package_name += '_TRT'
if USE_CUDA:
package_name += '_CUDA'
if USE_VULKAN:
package_name += '_VULKAN'
if USE_OPENCL:
package_name += '_OPENCL'
if USE_RENDER:
package_name += '_RENDER'
2020-11-05 16:41:56 +08:00
print ('Building with python wheel with package name ', package_name)
2020-12-15 14:12:35 +08:00
version = args.version
depend_pip_packages = ['numpy']
2023-06-16 09:42:45 +08:00
README = os.path.join(os.getcwd(), "README.md")
with open(README) as f:
long_description = f.read()
def configure_extension_build():
r"""Configures extension build options according to system environment and user's choice.
Returns:
ext_modules, cmdclass, packages and entry_points as required in setuptools.setup.
"""
################################################################################
# Configure compile flags
################################################################################
if IS_WINDOWS:
# /NODEFAULTLIB makes sure we only link to DLL runtime
# and matches the flags set for protobuf and ONNX
# extra_link_args = ['/NODEFAULTLIB:LIBCMT.LIB']
# /MD links against DLL runtime
# and matches the flags set for protobuf and ONNX
2022-02-18 11:30:27 +08:00
# /Zi turns on symbolic debugging information in separate .pdb (which is same as MNN.pdb)
# /EHa is about native C++ catch support for asynchronous
# structured exception handling (SEH)
# /DNOMINMAX removes builtin min/max functions
# /wdXXXX disables warning no. XXXX
2022-02-18 11:30:27 +08:00
# Some macro (related with __VA_ARGS__) defined in pymnn/src/util.h can not be process correctly
# becase of MSVC bug, enable /experimental:preprocessor fix it (And Windows SDK >= 10.0.18362.1)
extra_compile_args = ['/MT', '/Zi',
'/EHa', '/DNOMINMAX',
'/wd4267', '/wd4251', '/wd4522', '/wd4522', '/wd4838',
'/wd4305', '/wd4244', '/wd4190', '/wd4101', '/wd4996',
2022-02-18 11:30:27 +08:00
'/wd4275', '/experimental:preprocessor']
extra_link_args = []
else:
extra_link_args = []
extra_compile_args = [
'-std=c++11',
'-Wall',
'-Wextra',
'-Wno-strict-overflow',
'-Wno-unused-parameter',
'-Wno-missing-field-initializers',
'-Wno-write-strings',
'-Wno-unknown-pragmas',
# This is required for Python 2 declarations that are deprecated in 3.
'-Wno-deprecated-declarations',
# Python 2.6 requires -fno-strict-aliasing, see
# http://legacy.python.org/dev/peps/pep-3123/
# We also depend on it in our code (even Python 3).
'-fno-strict-aliasing',
# Clang has an unfixed bug leading to spurious missing
# braces warnings, see
# https://bugs.llvm.org/show_bug.cgi?id=21629
'-Wno-missing-braces',
]
if check_env_flag('WERROR'):
extra_compile_args.append('-Werror')
2022-08-12 10:30:48 +08:00
extra_compile_args += ['-DPYMNN_EXPR_API', '-DPYMNN_NUMPY_USABLE', '-DPYMNN_OPENCV_API']
2023-12-04 11:12:20 +08:00
if IS_LINUX and USE_INTERNAL:
2022-02-18 11:30:27 +08:00
extra_compile_args += ['-DPYMNN_INTERNAL_SERVING']
if args.env == 'daily':
extra_compile_args += ['-DPYMNN_INTERNAL_SERVING_DAILY']
- build: - unify schema building in core and converter; - add more build script for android; - add linux build script for python; - ops impl: - add floor mod support in binary; - use eltwise impl in add/max/sub/mul binary for optimization; - remove fake double support in cast; - fix 5d support for concat; - add adjX and adjY support for batch matmul; - optimize conv2d back prop filter; - add pad mode support for conv3d; - fix bug in conv2d & conv depthwise with very small feature map; - optimize binary without broacast; - add data types support for gather; - add gather ND support; - use uint8 data type in gather v2; - add transpose support for matmul; - add matrix band part; - add dim != 4 support for padding, reshape & tensor convert; - add pad type support for pool3d; - make ops based on TensorFlow Lite quantization optional; - add all & any support for reduction; - use type in parameter as output type in reduction; - add int support for unary; - add variable weight support for conv2d; - fix conv2d depthwise weights initialization; - fix type support for transpose; - fix grad outputs count for reduce grad and reshape grad; - fix priorbox & detection output; - fix metal softmax error; - python: - add runSessionWithCallBackInfo interface; - add max nodes limit (1400) for visualization tool; - fix save error in python3; - align default dim; - convert: - add extra design for optimization; - add more post converting optimizers; - add caffe v1 weights blob support; - add cast, unary, conv transpose support for onnx model; - optimize batchnorm, conv with variable weights, prelu, reshape, slice, upsample for onnx model; - add cos/sin/atan/tan support for unary for tensorflow model; - add any/all support for reduction for tensorflow model; - add elu, conv3d, pool3d support for tensorflow model; - optimize argmax, batchnorm, concat, batch to space, conv with variable weights, prelu, slice for tensorflow model; - others: - fix size computer lock; - fix thread pool deadlock; - add express & parameters in express; - rewrite blitter chooser without static map; - add tests for expr;
2019-10-29 13:37:26 +08:00
root_dir = os.getenv('PROJECT_ROOT', os.path.dirname(os.path.dirname(os.getcwd())))
2020-12-15 14:12:35 +08:00
engine_compile_args = ['-DBUILD_OPTYPE', '-DPYMNN_TRAIN_API']
engine_libraries = []
engine_library_dirs = [os.path.join(root_dir, BUILD_DIR)]
2020-02-14 15:02:01 +08:00
engine_library_dirs += [os.path.join(root_dir, BUILD_DIR, "tools", "train")]
engine_library_dirs += [os.path.join(root_dir, BUILD_DIR, "tools", "cv")]
2020-11-05 16:41:56 +08:00
engine_library_dirs += [os.path.join(root_dir, BUILD_DIR, "source", "backend", "tensorrt")]
2023-05-18 19:11:50 +08:00
engine_library_dirs += [os.path.join(root_dir, BUILD_DIR, "source", "backend", "cuda")]
if USE_TRT or USE_CUDA:
2020-11-05 16:41:56 +08:00
# Note: TensorRT-5.1.5.0/lib should be set in $LIBRARY_PATH of the build system.
engine_library_dirs += ['/usr/local/cuda/lib64/']
2022-02-18 11:30:27 +08:00
# Logging is enabled on Linux. Add the dependencies.
2023-12-04 11:12:20 +08:00
if IS_LINUX and USE_INTERNAL:
2022-02-18 11:30:27 +08:00
engine_library_dirs += ['/usr/include/curl/']
print(engine_library_dirs)
engine_link_args = []
engine_sources = [os.path.join(root_dir, "pymnn", "src", "MNN.cc")]
2023-12-04 11:12:20 +08:00
if IS_LINUX and USE_INTERNAL:
2022-02-18 11:30:27 +08:00
engine_sources += [os.path.join(root_dir, "pymnn", "src", "internal", "monitor_service.cc")]
engine_sources += [os.path.join(root_dir, "pymnn", "src", "internal", "verify_service.cc")]
engine_sources += [os.path.join(root_dir, "pymnn", "src", "internal", "http_util.cc")]
engine_include_dirs = [os.path.join(root_dir, "include")]
2020-02-03 13:36:32 +08:00
engine_include_dirs += [os.path.join(root_dir, "express")]
2020-12-15 14:12:35 +08:00
engine_include_dirs += [os.path.join(root_dir, "express", "module")]
2020-01-16 14:25:34 +08:00
engine_include_dirs += [os.path.join(root_dir, "source")]
engine_include_dirs += [os.path.join(root_dir, "tools")]
engine_include_dirs += [os.path.join(root_dir, "tools", "train", "source", "nn")]
2020-02-14 15:02:01 +08:00
engine_include_dirs += [os.path.join(root_dir, "tools", "train", "source", "grad")]
engine_include_dirs += [os.path.join(root_dir, "tools", "train", "source", "module")]
engine_include_dirs += [os.path.join(root_dir, "tools", "train", "source", "parameters")]
engine_include_dirs += [os.path.join(root_dir, "tools", "train", "source", "optimizer")]
2020-02-17 15:30:28 +08:00
engine_include_dirs += [os.path.join(root_dir, "tools", "train", "source", "data")]
engine_include_dirs += [os.path.join(root_dir, "tools", "train", "source", "transformer")]
2020-01-16 14:25:34 +08:00
engine_include_dirs += [os.path.join(root_dir, "source", "core")]
engine_include_dirs += [os.path.join(root_dir, "schema", "current")]
engine_include_dirs += [os.path.join(root_dir, "3rd_party",\
"flatbuffers", "include")]
2023-12-04 11:12:20 +08:00
if IS_LINUX and USE_INTERNAL:
2022-02-18 11:30:27 +08:00
engine_include_dirs += [os.path.join(root_dir, "3rd_party", "rapidjson")]
# cv include
engine_include_dirs += [os.path.join(root_dir, "tools", "cv", "include")]
2020-07-04 01:21:30 +08:00
engine_include_dirs += [np.get_include()]
2020-11-05 16:41:56 +08:00
2023-12-04 11:12:20 +08:00
lib_files = []
2020-11-05 16:41:56 +08:00
trt_depend = ['-lTRT_CUDA_PLUGIN', '-lnvinfer', '-lnvparsers', '-lnvinfer_plugin', '-lcudart']
2023-05-18 19:11:50 +08:00
cuda_depend = ['-lMNN_Cuda_Main']
engine_depend = ['-lMNN']
2022-02-18 11:30:27 +08:00
# enable logging & model authentication on linux.
2023-12-04 11:12:20 +08:00
if IS_LINUX and USE_INTERNAL:
2022-02-18 11:30:27 +08:00
engine_depend += ['-lcurl', '-lssl', '-lcrypto']
2020-11-05 16:41:56 +08:00
if USE_TRT:
engine_depend += trt_depend
2023-05-18 19:11:50 +08:00
if USE_CUDA:
engine_depend += cuda_depend
2023-12-04 11:12:20 +08:00
lib_files += [('lib', [os.path.join(root_dir, BUILD_DIR, "source", "backend", "cuda", "libMNN_Cuda_Main.so")])]
2023-05-18 19:11:50 +08:00
tools_compile_args = []
tools_libraries = []
2022-08-12 10:30:48 +08:00
tools_depend = ['-lMNN', '-lMNNConvertDeps', '-lprotobuf']
tools_library_dirs = [os.path.join(root_dir, BUILD_DIR)]
tools_library_dirs += [os.path.join(root_dir, BUILD_DIR, "tools", "converter")]
2020-11-05 16:41:56 +08:00
tools_library_dirs += [os.path.join(root_dir, BUILD_DIR, "source", "backend", "tensorrt")]
2023-05-18 19:11:50 +08:00
tools_library_dirs += [os.path.join(root_dir, BUILD_DIR, "source", "backend", "cuda")]
tools_library_dirs += [os.path.join(root_dir, BUILD_DIR, "3rd_party", "protobuf", "cmake")]
2020-11-05 16:41:56 +08:00
2022-08-12 10:30:48 +08:00
# add libTorch dependency
torch_lib = None
cmakecache = os.path.join(root_dir, BUILD_DIR, 'CMakeCache.txt')
for line in open(cmakecache, 'rt').readlines():
if 'TORCH_LIBRARY' in line:
torch_lib = os.path.dirname(line[line.find('=')+1:])
break
if torch_lib is not None:
tools_depend += ['-ltorch', '-ltorch_cpu', '-lc10']
if IS_LINUX:
tools_library_dirs += [torch_lib]
elif IS_DARWIN:
torch_path = os.path.dirname(torch_lib)
tools_library_dirs += [torch_lib]
2023-12-04 11:12:20 +08:00
lib_files += [('lib', [os.path.join(torch_lib, 'libtorch.dylib'), os.path.join(torch_lib, 'libtorch_cpu.dylib'),
2023-01-11 15:08:58 +08:00
os.path.join(torch_lib, 'libc10.dylib')]),
('.dylibs', [os.path.join(torch_lib, 'libiomp5.dylib')])]
'''
2023-12-04 11:12:20 +08:00
lib_files += [('lib', [os.path.join(torch_lib, 'libtorch.dylib'), os.path.join(torch_lib, 'libtorch_cpu.dylib'),
2022-08-12 10:30:48 +08:00
os.path.join(torch_lib, 'libc10.dylib')]),
('.dylibs', [os.path.join(torch_path, '.dylibs', 'libiomp5.dylib')])]
2023-01-11 15:08:58 +08:00
'''
2023-05-18 19:11:50 +08:00
if USE_TRT or USE_CUDA:
2020-11-05 16:41:56 +08:00
# Note: TensorRT-5.1.5.0/lib should be set in $LIBRARY_PATH of the build system.
tools_library_dirs += ['/usr/local/cuda/lib64/']
2023-12-04 11:12:20 +08:00
if IS_LINUX and USE_INTERNAL:
2022-02-18 11:30:27 +08:00
tools_library_dirs += ['/usr/include/curl/']
tools_link_args = []
tools_sources = [os.path.join(root_dir, "pymnn", "src", "MNNTools.cc")]
tools_sources += [os.path.join(root_dir, "tools", "quantization",\
"calibration.cpp")]
tools_sources += [os.path.join(root_dir, "tools", "quantization",\
"TensorStatistic.cpp")]
tools_sources += [os.path.join(root_dir, "tools", "quantization",\
"quantizeWeight.cpp")]
tools_sources += [os.path.join(root_dir, "tools", "quantization", "Helper.cpp")]
2020-11-05 16:41:56 +08:00
tools_include_dirs = []
tools_include_dirs += [os.path.join(root_dir, "tools", "converter",\
2019-12-27 22:16:57 +08:00
"include")]
tools_include_dirs += [os.path.join(root_dir, "tools", "converter",\
"source", "tflite", "schema")]
tools_include_dirs += [os.path.join(root_dir, "tools", "converter", "source")]
tools_include_dirs += [os.path.join(root_dir, BUILD_DIR, "tools", "converter")]
tools_include_dirs += [os.path.join(root_dir, "include")]
tools_include_dirs += [os.path.join(root_dir, "tools")]
tools_include_dirs += [os.path.join(root_dir, "tools", "quantization")]
tools_include_dirs += [os.path.join(root_dir, "3rd_party",\
"flatbuffers", "include")]
tools_include_dirs += [os.path.join(root_dir, "3rd_party")]
tools_include_dirs += [os.path.join(root_dir, "3rd_party", "imageHelper")]
tools_include_dirs += [os.path.join(root_dir, "source", "core")]
2019-12-27 22:16:57 +08:00
tools_include_dirs += [os.path.join(root_dir, "schema", "current")]
tools_include_dirs += [os.path.join(root_dir, "source")]
2021-04-08 15:34:23 +08:00
tools_include_dirs += [np.get_include()]
2020-11-05 16:41:56 +08:00
2022-02-18 11:30:27 +08:00
# enable logging and model authentication on linux.
2023-12-04 11:12:20 +08:00
if IS_LINUX and USE_INTERNAL:
2022-02-18 11:30:27 +08:00
tools_depend += ['-lcurl', '-lssl', '-lcrypto']
2020-11-05 16:41:56 +08:00
if USE_TRT:
tools_depend += trt_depend
2023-05-18 19:11:50 +08:00
if USE_CUDA:
tools_depend += cuda_depend
if IS_DARWIN:
2022-08-12 10:30:48 +08:00
engine_link_args += ['-stdlib=libc++']
2022-02-18 11:30:27 +08:00
engine_link_args += ['-Wl,-all_load']
engine_link_args += engine_depend
engine_link_args += ['-Wl,-noall_load']
if IS_LINUX:
2022-02-18 11:30:27 +08:00
engine_link_args += ['-Wl,--whole-archive']
engine_link_args += engine_depend
engine_link_args += ['-fopenmp']
engine_link_args += ['-Wl,--no-whole-archive']
if IS_WINDOWS:
2022-02-18 11:30:27 +08:00
engine_link_args += ['/WHOLEARCHIVE:MNN.lib']
if IS_DARWIN:
2022-02-18 11:30:27 +08:00
tools_link_args += ['-Wl,-all_load']
tools_link_args += tools_depend
tools_link_args += ['-Wl,-noall_load']
if IS_LINUX:
2022-02-18 11:30:27 +08:00
tools_link_args += ['-Wl,--whole-archive']
tools_link_args += tools_depend
tools_link_args += ['-fopenmp']
tools_link_args += ['-Wl,--no-whole-archive']
tools_link_args += ['-lz']
if IS_WINDOWS:
2022-02-18 11:30:27 +08:00
tools_link_args += ['/WHOLEARCHIVE:MNN.lib']
tools_link_args += ['/WHOLEARCHIVE:MNNConvertDeps.lib']
tools_link_args += ['libprotobuf.lib'] # use wholearchive will cause lnk1241 (version.rc specified)
if BUILD_TYPE == 'DEBUG':
2022-02-18 11:30:27 +08:00
# Need pythonxx_d.lib, which seem not exist in miniconda ?
if IS_WINDOWS:
2022-02-18 11:30:27 +08:00
extra_compile_args += ['/DEBUG', '/UNDEBUG', '/DDEBUG', '/Od', '/Ob0', '/MTd']
extra_link_args += ['/DEBUG', '/UNDEBUG', '/DDEBUG', '/Od', '/Ob0', '/MTd']
else:
extra_compile_args += ['-O0', '-g']
extra_link_args += ['-O0', '-g']
if BUILD_TYPE == 'REL_WITH_DEB_INFO':
if IS_WINDOWS:
2022-02-18 11:30:27 +08:00
extra_compile_args += ['/DEBUG']
extra_link_args += ['/DEBUG', '/OPT:REF', '/OPT:ICF']
else:
extra_compile_args += ['-g']
extra_link_args += ['-g']
2022-02-18 11:30:27 +08:00
# compat with py39
def make_relative_rpath(path):
""" make rpath """
if IS_DARWIN:
2022-02-18 11:30:27 +08:00
return ['-Wl,-rpath,@loader_path/' + path]
elif IS_WINDOWS:
2022-02-18 11:30:27 +08:00
return []
else:
2022-02-18 11:30:27 +08:00
return ['-Wl,-rpath,$ORIGIN/' + path]
################################################################################
# Declare extensions and package
################################################################################
extensions = []
packages = find_packages()
engine = Extension("_mnncengine",\
libraries=engine_libraries,\
sources=engine_sources,\
language='c++',\
extra_compile_args=engine_compile_args + extra_compile_args,\
include_dirs=engine_include_dirs,\
library_dirs=engine_library_dirs,\
2022-02-18 11:30:27 +08:00
extra_link_args=engine_link_args + extra_link_args\
+ make_relative_rpath('lib'))
extensions.append(engine)
tools = Extension("_tools",\
libraries=tools_libraries,\
sources=tools_sources,\
language='c++',\
extra_compile_args=tools_compile_args + extra_compile_args,\
include_dirs=tools_include_dirs,\
library_dirs=tools_library_dirs,\
2022-02-18 11:30:27 +08:00
extra_link_args=tools_link_args + extra_link_args\
+ make_relative_rpath('lib'))
extensions.append(tools)
# These extensions are built by cmake and copied manually in build_extensions()
# inside the build_ext implementaiton
cmdclass = {}
entry_points = {
'console_scripts': [
'mnnconvert = MNN.tools.mnnconvert:main',
'mnnquant = MNN.tools.mnnquant:main',
'mnn = MNN.tools.mnn:main'
]
}
2022-08-12 10:30:48 +08:00
return extensions, cmdclass, packages, entry_points, lib_files
# post run, warnings, printed at the end to make them more visible
build_update_message = """
It is no longer necessary to use the 'build' or 'rebuild' targets
To install:
$ python setup.py install
To develop locally:
$ python setup.py develop
To force cmake to re-generate native build files (off by default):
$ python setup.py develop --cmake
"""
if __name__ == '__main__':
# Parse the command line and check the arguments
# before we proceed with building deps and setup
dist = Distribution()
dist.script_name = sys.argv[0]
dist.script_args = sys.argv[1:]
try:
ok = dist.parse_command_line()
except DistutilsArgError as msg:
raise SystemExit(core.gen_usage(dist.script_name) + "\nerror: %s" % msg)
if not ok:
sys.exit()
2022-08-12 10:30:48 +08:00
extensions, cmdclass, packages, entry_points, lib_files = configure_extension_build()
setup(
name=package_name,
version=version,
description=("C methods for MNN Package"),
long_description=long_description,
ext_modules=extensions,
cmdclass=cmdclass,
packages=packages,
2022-08-12 10:30:48 +08:00
data_files=lib_files,
entry_points=entry_points,
install_requires=depend_pip_packages,
url='https://www.yuque.com/mnn/en/usage_in_python',
2020-11-05 16:41:56 +08:00
download_url='https://github.com/alibaba/MNN',
author='alibaba MNN Team',
author_email='lichuan.wlc@alibaba-inc.com',
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*',
# PyPI package information.
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Intended Audience :: Education',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: BSD License',
'Programming Language :: C++',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Topic :: Scientific/Engineering',
'Topic :: Scientific/Engineering :: Mathematics',
'Topic :: Scientific/Engineering :: Artificial Intelligence',
'Topic :: Software Development',
'Topic :: Software Development :: Libraries',
'Topic :: Software Development :: Libraries :: Python Modules',
],
license='BSD-3',
keywords='MNN Engine',
)