-
Notifications
You must be signed in to change notification settings - Fork 13.4k
[mlir][python] add pyproject.toml #124878
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Part of the LLVM Project, 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 | ||
# Copyright (c) 2025. | ||
|
||
[project] | ||
name = "mlir-python-bindings" | ||
version = "0.0.1" | ||
requires-python = ">=3.8,<=3.13" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there anything that prevents the mlir bindings from working with Python versions newer than 3.13? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no - this toml is copy-pasta from some downstream uses where I do have a hard upperbound but for upstream there's no blocker. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we remove it then? |
||
[project.urls] | ||
Homepage = "https://github.com/llvm/llvm-project" | ||
makslevental marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Discussions = "https://discourse.llvm.org/" | ||
"Issue Tracker" = "https://github.com/llvm/llvm-project/issues?q=is%3Aissue%20state%3Aopen%20label%3Amlir%3Apython%20" | ||
"Source Code" = "https://github.com/llvm/llvm-project/tree/main/mlir/python" | ||
|
||
[build-system] | ||
requires = [ | ||
"scikit-build-core==0.10.7", | ||
"typing_extensions==4.12.2", | ||
"nanobind>=2.4, <3.0", | ||
"numpy>=1.19.5, <=2.1.2", | ||
"pybind11>=2.10.0, <=2.13.6", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this due to some of the in repo dialects still using pybind? (downstream folks obviously weren't asked to switch etc) |
||
"PyYAML>=5.4.0, <=6.0.1", | ||
'ml_dtypes>=0.1.0, <=0.6.0; python_version<"3.13"', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I feel like this is optional and so too numpy - both very useful and used by most, but optional. |
||
'ml_dtypes>=0.5.0, <=0.6.0; python_version>="3.13"' | ||
] | ||
build-backend = "scikit_build_core.build" | ||
|
||
[tool.scikit-build] | ||
minimum-version = "0.10" | ||
build-dir = "../../build" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could we use environment variables from/thread through to cmake here? |
||
cmake.source-dir = "../../llvm" | ||
wheel.exclude = ["bin", "include", "lib", "src", "share"] | ||
build.targets = ["MLIRPythonModules"] | ||
|
||
[tool.scikit-build.cmake.define] | ||
CMAKE_C_COMPILER_LAUNCHER = { env = "CMAKE_C_COMPILER_LAUNCHER", default = "" } | ||
CMAKE_CXX_COMPILER_LAUNCHER = { env = "CMAKE_CXX_COMPILER_LAUNCHER", default = "" } | ||
CMAKE_CXX_VISIBILITY_PRESET = "hidden" | ||
CMAKE_VERBOSE_MAKEFILE = "ON" | ||
LLVM_ENABLE_PROJECTS = "mlir" | ||
MLIR_ENABLE_BINDINGS_PYTHON = "ON" | ||
MLIR_BINDINGS_PYTHON_INSTALL_PREFIX = "mlir" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OOC, do you have any idea when we'd bump this? E.g., every new feature bump? (is there an option to just have sha attached or something, I see there is some support for dynamic version)