Skip to content

Commit 2311e04

Browse files
authored
Populate more metadata in compiler and runtime Python packages. (iree-org#19118)
This will add more content to https://pypi.org/project/iree-base-compiler/ and https://pypi.org/project/iree-base-runtime/. We can also add more text to the README files or use the repository root README instead. Docs I followed: * https://packaging.python.org/en/latest/specifications/core-metadata/ * https://packaging.python.org/en/latest/specifications/well-known-project-urls/#well-known-project-urls
1 parent 4477091 commit 2311e04

File tree

3 files changed

+30
-3
lines changed

3 files changed

+30
-3
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# IREE Python Compiler API
2+
3+
This package provides an API for compiling IREE binaries from common input formats.

compiler/setup.py

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,20 @@ def find_git_submodule_revision(submodule_path):
414414
)
415415
print(f"Found compiler packages: {packages}")
416416

417+
with open(
418+
os.path.join(
419+
IREE_SOURCE_DIR,
420+
"compiler",
421+
"bindings",
422+
"python",
423+
"iree",
424+
"compiler",
425+
"README.md",
426+
),
427+
"rt",
428+
) as f:
429+
README = f.read()
430+
417431
custom_package_suffix = os.getenv("IREE_COMPILER_CUSTOM_PACKAGE_SUFFIX", "")
418432
custom_package_prefix = os.getenv("IREE_COMPILER_CUSTOM_PACKAGE_PREFIX", "")
419433

@@ -422,8 +436,9 @@ def find_git_submodule_revision(submodule_path):
422436
version=f"{PACKAGE_VERSION}",
423437
author="IREE Authors",
424438
author_email="[email protected]",
425-
description="IREE Compiler API",
426-
long_description="",
439+
description="IREE Python Compiler API",
440+
long_description=README,
441+
long_description_content_type="text/markdown",
427442
license="Apache-2.0",
428443
classifiers=[
429444
"Development Status :: 3 - Alpha",
@@ -435,6 +450,11 @@ def find_git_submodule_revision(submodule_path):
435450
"Programming Language :: Python :: 3.12",
436451
"Programming Language :: Python :: 3.13",
437452
],
453+
project_urls={
454+
"homepage": "https://iree.dev/",
455+
"repository": "https://github.com/iree-org/iree",
456+
"documentation": "https://iree.dev/reference/bindings/python/",
457+
},
438458
ext_modules=[
439459
CMakeExtension("iree.compiler._mlir_libs._mlir"),
440460
CMakeExtension("iree.compiler._mlir_libs._ireeDialects"),

runtime/setup.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,11 @@ def populate_built_package(abs_dir):
539539
"Programming Language :: Python :: 3.12",
540540
"Programming Language :: Python :: 3.13",
541541
],
542-
url="https://github.com/iree-org/iree",
542+
project_urls={
543+
"homepage": "https://iree.dev/",
544+
"repository": "https://github.com/iree-org/iree",
545+
"documentation": "https://iree.dev/reference/bindings/python/",
546+
},
543547
python_requires=">=3.9",
544548
ext_modules=(
545549
[

0 commit comments

Comments
 (0)