Here’s the table of contents:
安装UV
pip install uv
同步依赖项到当前项目
uv sync
初始化项目,生成.toml
文件
uv init
安装依赖并生成或更新uv.lock
文件
uv pip install <package-name>@latest
uv pip install <package-name>==<version>
打包代码
# 会在dist目录下生成`.gz`和`.whl`文件
uv build
备注
- project.toml文件与setup.py文件作用类似,都是python包打包发布时需要使用的文件
- uv.lock文件的作用与requirement.txt类似
requirements
操作
# 生成`requirements.txt`文件
pip freeze > requirements.txt
# 安装所有依赖项
pip install -r requirements.txt
参考操作
# 删除之前的打包文件
del /f /q dist\*.*
# 使用`setup.py`打包
python setup.py sdist
# 上传到仓库
twine upload -r nexus dist\*
参考setup.py
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
setup(
name='llmcompiler',
version="1.3.0",
author="Yc-Ma",
author_email="yanchaoma@foxmail.com",
description='LLMCompiler',
long_description=open('README.md', encoding='utf-8').read(),
long_description_content_type='text/markdown',
url='https://github.com/crazyyanchao/llmcompiler',
packages=find_packages(),
classifiers=[
'Development Status :: 4 - Beta', # 添加开发状态分类器
'Intended Audience :: Developers', # 添加目标受众分类器
'Topic :: Software Development :: Libraries :: Python Modules',
'Programming Language :: Python :: 3',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent'
],
python_requires='>=3.9',
install_requires=[
"langgraph==0.1.19",
"langchain==0.2.12",
"langchain-openai==0.1.20",
"pandas>=2.2.2",
"grandalf"
],
keywords=['LLMCompiler', 'Agent', 'Natural Language Processing', 'LLM', 'Machine Learning', 'AI', 'Compiler'],
include_package_data=True,
package_data={
# If any package contains *.txt or *.rst files, include them:
'': ['*.txt', '*.rst', '.csv']
},
)
PREVIOUSGraphRAG访问模式和知识图谱建模
NEXTSQLite数据库安装与使用