2 Star 0 Fork 1

無盡dē華爾茲/xinhou-openai-framework

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
setup.py 2.24 KB
一键复制 编辑 原始数据 按行查看 历史
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"
)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/sphrz/xinhou-openai-framework.git
git@gitee.com:sphrz/xinhou-openai-framework.git
sphrz
xinhou-openai-framework
xinhou-openai-framework
master

搜索帮助