Skip to content

Commit 72aea72

Browse files
committed
[Binding] Add hcl_mlir setup script
1 parent 30bc552 commit 72aea72

File tree

2 files changed

+45
-1
lines changed

2 files changed

+45
-1
lines changed

include/hcl/Bindings/Python/CMakeLists.txt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,4 +109,14 @@ add_custom_command(
109109
TARGET HCLMLIRPythonModules POST_BUILD
110110
COMMAND ${CMAKE_COMMAND} -E copy
111111
${HCL_MLIR_PYTHON_ROOT_DIR}/dialects/_scf_ops_ext.py
112-
${HCL_MLIR_PYTHON_PACKAGES_DIR}/hcl_core/hcl_mlir/dialects)
112+
${HCL_MLIR_PYTHON_PACKAGES_DIR}/hcl_core/hcl_mlir/dialects)
113+
114+
################################################################################
115+
# Add setup script
116+
################################################################################
117+
118+
add_custom_command(
119+
TARGET HCLMLIRPythonModules POST_BUILD
120+
COMMAND ${CMAKE_COMMAND} -E copy
121+
${HCL_MLIR_PYTHON_ROOT_DIR}/../setup.py
122+
${HCL_MLIR_PYTHON_PACKAGES_DIR}/hcl_core)
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# ===----------------------------------------------------------------------=== #
2+
#
3+
# Copyright 2021-2023 The HCL-MLIR Authors.
4+
#
5+
# ===----------------------------------------------------------------------=== #
6+
7+
import setuptools
8+
9+
def setup():
10+
setuptools.setup(
11+
name="hcl_mlir",
12+
description="HCL-MLIR: A HeteroCL-MLIR Dialect for Heterogeneous Computing",
13+
version="0.1",
14+
author="HeteroCL",
15+
setup_requires=[],
16+
install_requires=[],
17+
packages=setuptools.find_packages(),
18+
url="https://github.com/cornell-zhang/hcl-dialect",
19+
python_requires=">=3.6",
20+
classifiers=[
21+
"Programming Language :: Python :: 3.6",
22+
"Programming Language :: Python :: 3.7",
23+
"Programming Language :: Python :: 3.8",
24+
"Programming Language :: Python :: 3.9",
25+
"Programming Language :: Python :: 3.10",
26+
"Topic :: Scientific/Engineering :: Accelerator Design",
27+
"Operating System :: OS Independent",
28+
],
29+
zip_safe=True,
30+
)
31+
32+
33+
if __name__ == "__main__":
34+
setup()

0 commit comments

Comments
 (0)