Skip to content

Commit

Permalink
[Python] Populate setuptools description with README.md (apache#11078)
Browse files Browse the repository at this point in the history
* [Python] Populate setuptools description with README.md

Adds the description metadata for the setuptools descriptor file
`setup.py` with the contents of our existing README.md, which is
a common practice.

* Update python/setup.py

Co-authored-by: driazati <9407960+driazati@users.noreply.github.com>

* Update python/setup.py

Co-authored-by: driazati <9407960+driazati@users.noreply.github.com>

* Import pathlib and apply black formats.

Co-authored-by: driazati <9407960+driazati@users.noreply.github.com>
  • Loading branch information
2 people authored and juda committed Jun 21, 2022
1 parent 480fb98 commit 2de418e
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import shutil
import sys
import sysconfig
import pathlib
import platform

from setuptools import find_packages
Expand Down Expand Up @@ -201,6 +202,13 @@ def get_package_data_files():
return ["relay/std/prelude.rly", "relay/std/core.rly"]


def long_description_contents():
with open(pathlib.Path(CURRENT_DIR).resolve().parent / "README.md", encoding="utf-8") as readme:
description = readme.read()

return description


# Temporarily add this directory to the path so we can import the requirements generator
# tool.
sys.path.insert(0, os.path.dirname(__file__))
Expand All @@ -217,6 +225,21 @@ def get_package_data_files():
name="tvm",
version=__version__,
description="TVM: An End to End Tensor IR/DSL Stack for Deep Learning Systems",
long_description=long_description_contents(),
long_description_content_type="text/markdown",
url="https://tvm.apache.org/",
download_url="https://github.com/apache/tvm/tags",
author="Apache TVM",
license="Apache",
# See https://pypi.org/classifiers/
classifiers=[
"License :: OSI Approved :: Apache Software License",
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
],
keywords="machine learning",
zip_safe=False,
entry_points={"console_scripts": ["tvmc = tvm.driver.tvmc.main:main"]},
install_requires=requirements["core"][1],
Expand All @@ -225,7 +248,6 @@ def get_package_data_files():
package_dir={"tvm": "tvm"},
package_data={"tvm": get_package_data_files()},
distclass=BinaryDistribution,
url="https://github.com/apache/tvm",
ext_modules=config_cython(),
**setup_kwargs,
)
Expand Down

0 comments on commit 2de418e

Please sign in to comment.