| # Copyright 2020 The IREE Authors |
| # |
| # Licensed under the Apache License v2.0 with LLVM Exceptions. |
| # See https://llvm.org/LICENSE.txt for license information. |
| # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| |
| # Build platform specific wheel files for the iree.runtime package. |
| # Built artifacts are per-platform and build out of the build tree. |
| |
| import os |
| from setuptools import setup, find_namespace_packages, Extension |
| import sysconfig |
| |
| with open(os.path.join(os.path.dirname(__file__), "README.md"), "r") as f: |
| README = f.read() |
| |
| setup( |
| name="iree-runtime@IREE_RELEASE_PACKAGE_SUFFIX@", |
| version="@IREE_RELEASE_VERSION@", |
| author="The IREE Team", |
| author_email="iree-discuss@googlegroups.com", |
| description="IREE Python Runtime Components", |
| long_description=README, |
| long_description_content_type="text/markdown", |
| license="Apache-2.0", |
| classifiers=[ |
| "Programming Language :: Python :: 3.7", |
| "Programming Language :: Python :: 3.8", |
| "Programming Language :: Python :: 3.9", |
| ], |
| url="https://github.com/google/iree", |
| python_requires=">=3.7", |
| packages=find_namespace_packages( |
| include=["iree.runtime", "iree.runtime.*"]), |
| ext_modules=[ |
| Extension(name="iree.runtime.binding", sources=[]), |
| ], |
| # Matching the native extension as a data file keeps setuptools from |
| # "building" it (i.e. turning it into a static binary). |
| package_data={ |
| "": [ |
| f"*{sysconfig.get_config_var('EXT_SUFFIX')}", |
| "iree-run-module*", |
| "iree-run-trace*", |
| "iree-benchmark-trace*", |
| "iree-tracy-capture*", |
| ], |
| }, |
| entry_points={ |
| "console_scripts": [ |
| "iree-run-module = iree.runtime.scripts.iree_run_module.__main__:main", |
| "iree-run-trace = iree.runtime.scripts.iree_run_trace.__main__:main", |
| "iree-benchmark-trace = iree.runtime.scripts.iree_benchmark_trace.__main__:main", |
| "iree-tracy-capture = iree.runtime.scripts.iree_tracy_capture.__main__:main", |
| ], |
| }, |
| zip_safe=False, |
| install_requires=[ |
| "numpy", |
| "PyYAML", |
| ], |
| ) |