Skip to content

Commit

Permalink
Fix getting long description in setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiqwang committed Oct 24, 2021
1 parent 0b7012c commit 777783e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
2 changes: 0 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
repos:

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: check-docstring-first
- id: check-toml
- id: check-yaml
exclude: packaging/.*
- id: end-of-file-fixer
Expand Down
17 changes: 12 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
Adopted from TorchVision, see:
https://github.com/pytorch/vision/blob/master/setup.py
"""
import io
import subprocess
from pathlib import Path

Expand Down Expand Up @@ -38,6 +39,12 @@ def write_version_file():
f.write(" cuda = _check_cuda_version()\n")


def get_long_description():
# Get the long description from the README file
with io.open(str(PATH_ROOT / "README.md"), encoding="utf-8") as f:
return f.read()


def load_requirements(
path_dir=PATH_ROOT, file_name="requirements.txt", comment_char="#"
):
Expand All @@ -59,21 +66,21 @@ def load_requirements(

write_version_file()

# Get the long description from the README file
long_description = (PATH_ROOT / "README.md").read_text(encoding="utf-8")

setup(
name=PACKAGE_NAME,
version=VERSION,
description="Yet Another YOLOv5 and its Additional Runtime Stack",
description="Yet another yolov5 and its runtime stack for specialized accelerators.",
author="Zhiqiang Wang",
author_email="[email protected]",
long_description=long_description,
long_description=get_long_description(),
long_description_content_type="text/markdown",
url="https://github.com/zhiqwang/yolov5-rt-stack",
license="GPL-3.0",
packages=find_packages(exclude=["test", "deployment", "notebooks"]),
zip_safe=False,
options={
'bdist_wheel': {'python_tag': 'py36.py37.py38.py39'},
},
classifiers=[
# Operation system
"Operating System :: OS Independent",
Expand Down

0 comments on commit 777783e

Please sign in to comment.