From 00f5f63e00335292c670fcec28cdb99624c3a662 Mon Sep 17 00:00:00 2001 From: Shai Katz Date: Tue, 16 Apr 2024 11:14:16 +0300 Subject: [PATCH] Fix setup to use readme file --- .github/workflows/publish.yml | 4 ++++ setup.py | 11 +++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 49efb1d..aa6ba1b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -22,6 +22,10 @@ jobs: run: | python -m pip install --upgrade pip pip install build + - name: inject readme into setup.py long_description + run: | + python -c "import os; from setuptools import setup; setup(long_description=open('README.md').read())" + - name: Build package run: python -m build - name: Publish package diff --git a/setup.py b/setup.py index a115c1d..fa5d633 100644 --- a/setup.py +++ b/setup.py @@ -29,6 +29,11 @@ "pydantic >= 2", "typing-extensions >= 4.7.1", ] +# read the contents of your README file +from pathlib import Path + +this_directory = Path(__file__).parent +long_description = (this_directory / "README.md").read_text() setup( name=NAME, @@ -42,9 +47,7 @@ packages=find_packages(exclude=["test", "tests"]), include_package_data=True, license="MIT", - long_description_content_type='text/markdown', - long_description="""\ - No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - """, # noqa: E501 + long_description=long_description, + long_description_content_type="text/markdown", package_data={"monday_code": ["py.typed"]}, )