from setuptools import setup, find_packages import os # 读取README.md def read_file(filename): try: with open(filename, 'r', encoding='utf-8') as f: return f.read() except: return "Audio Player By DVS AFS - Advanced audio processing and playback with Opus support" # 定义版本常量 VERSION = "0.0.1a3" # 自动生成或更新 _version.py def write_version_file(): version_file_path = os.path.join("ap_ds", "_version.py") os.makedirs(os.path.dirname(version_file_path), exist_ok=True) with open(version_file_path, "w", encoding="utf-8") as f: f.write(f'__version__ = "{VERSION}"\n') # 调用函数生成版本文件 write_version_file() # 获取README内容 long_description = read_file("README.md") setup( name="ap-ds-afs", version=VERSION, description="Audio Player By DVS AFS - Audio processing and playback with Opus native support", long_description=long_description, long_description_content_type="text/markdown", author="DVS", author_email="me@dvsyun.top", url="https://apds.top", packages=find_packages(), classifiers=[ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: Other/Proprietary License", "Operating System :: Microsoft :: Windows", "Operating System :: MacOS", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Topic :: Multimedia :: Sound/Audio", "Topic :: Software Development :: Libraries :: Python Modules", ], keywords="audio music player playback opus sdl2 dvs afs all-format-support", python_requires=">=3.7", install_requires=[], include_package_data=True, license="Custom Open Source License", package_data={ '': ['*.md', '*.txt', '*.py'], }, project_urls={ 'Documentation': 'https://apds.top', 'License Info': 'https://apds.top', 'Source Code': 'https://gitcode.com/dvsxt/ap_ds', }, )