From 56d70e7230c4d51a2243b85e98cb246c23c5a3b4 Mon Sep 17 00:00:00 2001 From: Kevo Date: Sun, 27 Feb 2022 08:43:50 +0100 Subject: [PATCH] Fix setup.py --- piped_api/__init__.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/piped_api/__init__.py b/piped_api/__init__.py index 5e8c108..ca3722d 100644 --- a/piped_api/__init__.py +++ b/piped_api/__init__.py @@ -1,13 +1,23 @@ import typing as t +from pathlib import Path from .client import PipedClient - from .models.comments import Comments -from setup import __doc__ as __sdoc__ -__doc__ = __sdoc__ + +# For pdoc: +README_PATH = Path(__file__).parent.absolute() / Path('README.md') +try: + with open(README_PATH, 'r', encoding="UTF-8") as readme: + __readme__ = readme.read() + +except: + __readme__ = "Failed to read README.md!" + +__doc__ = __readme__ + # Supress unused-import warnings: