-
Notifications
You must be signed in to change notification settings - Fork 648
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
Populate more metadata in compiler and runtime Python packages. #19118
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,3 @@ | ||
# IREE Python Compiler API | ||
|
||
This package provides an API for compiling IREE binaries from common input formats. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -414,6 +414,20 @@ def find_git_submodule_revision(submodule_path): | |
) | ||
print(f"Found compiler packages: {packages}") | ||
|
||
with open( | ||
os.path.join( | ||
IREE_SOURCE_DIR, | ||
"compiler", | ||
"bindings", | ||
"python", | ||
"iree", | ||
"compiler", | ||
"README.md", | ||
), | ||
"rt", | ||
) as f: | ||
README = f.read() | ||
|
||
custom_package_suffix = os.getenv("IREE_COMPILER_CUSTOM_PACKAGE_SUFFIX", "") | ||
custom_package_prefix = os.getenv("IREE_COMPILER_CUSTOM_PACKAGE_PREFIX", "") | ||
|
||
|
@@ -422,8 +436,9 @@ def find_git_submodule_revision(submodule_path): | |
version=f"{PACKAGE_VERSION}", | ||
author="IREE Authors", | ||
author_email="[email protected]", | ||
description="IREE Compiler API", | ||
long_description="", | ||
description="IREE Python Compiler API", | ||
long_description=README, | ||
long_description_content_type="text/markdown", | ||
license="Apache-2.0", | ||
classifiers=[ | ||
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. @stellaraccident how do you feel about us changing the Looks like iree-turbine is already Others:
|
||
"Development Status :: 3 - Alpha", | ||
|
@@ -435,6 +450,11 @@ def find_git_submodule_revision(submodule_path): | |
"Programming Language :: Python :: 3.12", | ||
"Programming Language :: Python :: 3.13", | ||
], | ||
project_urls={ | ||
"homepage": "https://iree.dev/", | ||
"repository": "https://github.com/iree-org/iree", | ||
"documentation": "https://iree.dev/reference/bindings/python/", | ||
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 considered linking to https://iree-python-api.readthedocs.io/en/latest/ here, but we don't have a link from readthedocs back to iree.dev. 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. Yes, let's go with iree.dev for now which at least links to rtd. |
||
}, | ||
ext_modules=[ | ||
CMakeExtension("iree.compiler._mlir_libs._mlir"), | ||
CMakeExtension("iree.compiler._mlir_libs._ireeDialects"), | ||
|
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.
A more lightweight solution could be to add
readme = "README.md"
to thepyproject.toml
but as it only defines the build dependencies for this Python package, I would stick with what you got here.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.
That could work. Note that we have README files in two locations for the runtime package, and I'm matching that structure here for the compiler package:
setup.py
andpyproject.toml
)setup.py
andpyproject.toml
)Should probably make a pass through and clean up the files. Some were last updated halfway through code restructuring:
iree/runtime/README.md
Lines 1 to 8 in 4477091
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.
Feels like we might want to move https://github.com/iree-org/iree/blob/main/runtime/bindings/python/iree/runtime/README.md closer to https://github.com/iree-org/iree/tree/main/docs/api_docs/python (not merging it with the README.md there but moving into a newly to create
_static
folder).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.
Interesting idea. I feel like API docs and a package README are a bit different though 🤔
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.
I have confused myself and therefore it is not an interesting idea at all and rather wrong. I thought the README I was referring to was used for RTD but that is obviously not the case you mentioned it is used for PyPi. We should than probably fuse the two READMEs we have for the runtime?