From 2af84ab8ff033fd1df68204ad1eb89a5736ca805 Mon Sep 17 00:00:00 2001 From: 2061360308 <2061360308@qq.com> Date: Thu, 14 Dec 2023 18:29:16 +0800 Subject: [PATCH] fix:fix setup's handling of readme --- package/README.md => README.md | 0 package/setup.py | 11 +++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) rename package/README.md => README.md (100%) diff --git a/package/README.md b/README.md similarity index 100% rename from package/README.md rename to README.md diff --git a/package/setup.py b/package/setup.py index 221ee14..790ee87 100644 --- a/package/setup.py +++ b/package/setup.py @@ -19,7 +19,7 @@ URL = 'https://github.com/2061360308/NeteaseCloudMusic_PythonSDK' EMAIL = '2061360308@qq.com' AUTHOR = '盧瞳' REQUIRES_PYTHON = '>=3.6.0' -VERSION = '0.1.3' +VERSION = '0.1.4' # What packages are required for this module to be executed? REQUIRED = [ @@ -39,10 +39,17 @@ EXTRAS = { here = os.path.abspath(os.path.dirname(__file__)) +print("copy README.md start") +with open(os.path.join(here, '../README.md'), 'r', encoding='utf-8') as f: + README = f.read() +with open(os.path.join(here, 'README.md'), 'w+', encoding='utf-8') as f: + f.write(README) +print("copy README.md end") + # Import the README and use it as the long-description. # Note: this will only work if 'README.md' is present in your MANIFEST.in file! try: - with io.open(os.path.join(here, '../README.md'), encoding='utf-8') as f: + with io.open(os.path.join(here, 'README.md'), encoding='utf-8') as f: long_description = '\n' + f.read() except FileNotFoundError: long_description = DESCRIPTION