代码拉取完成,页面将自动刷新
import os
import re
from os import path
from setuptools import setup, find_packages
from xinhou_openai_framework.core.config.ConfigHandler import ConfigHandler
from xinhou_openai_framework.utils.ObjDictUtil import ObjectDict
from xinhou_openai_framework.utils.StrUtil import StrUtil
read_stream_config = ConfigHandler.read_yaml(os.path.join(os.getcwd(), "application.yml"))
base_ctx = ObjectDict.from_dict(read_stream_config)
base_path = path.abspath(path.dirname(__file__))
with open(path.join(base_path, 'requirements.txt'), 'r', encoding='utf-8') as f:
all_reqs = f.read().split('\n')
with open(path.join(base_path, 'README.md'), 'r', encoding='utf-8') as f:
long_description = f.read()
install_requires = [x.strip() for x in all_reqs if 'git+' not in x]
# 定义一个函数,用于判断是否需要排除指定的包
def get_exclude_package(package_name):
# 需要排除的目录列表
excluded_dirs = ['apps', 'common', 'deploy', 'logs', 'static']
# 判断包名是否在排除的目录列表中
return any(package_name.startswith(dir_name) for dir_name in excluded_dirs)
# 查找包时排除指定的目录
excluded_packages = [package for package in find_packages() if get_exclude_package(package)]
setup(
name=StrUtil.replace(base_ctx.application.name,'-','_'),
version=base_ctx.application.version,
author=base_ctx.application.author,
author_email=base_ctx.application.email,
description='XINHOU-OPENAI-FRAMEWORK基础框架,主要提供应用服务的底层支持技术代码支撑,通过该框架可以快速实现单服务、微服务、消息队列、ORM的快速开发!',
long_description=long_description,
long_description_content_type='text/markdown',
url='http://gitlab.xinhouai.com/openai/xinhou-openai-framework.git',
include_package_data=True,
packages=find_packages(exclude=excluded_packages),
install_requires=install_requires,
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: Other/Proprietary License",
"Programming Language :: Python :: 3",
"Operating System :: MacOS",
"Topic :: Software Development :: Libraries :: Python Modules",
],
python_requires=">=3.9"
)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。