-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add PyPI package support for uvx/pip installation #1764
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
Copilot
wants to merge
14
commits into
master
Choose a base branch
from
copilot/create-langbot-python-package
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Created langbot/ package with __init__.py and __main__.py entry point - Added paths utility to find frontend and resource files from package installation - Updated config loading to use resource paths - Updated frontend serving to use resource paths - Added MANIFEST.in for package data inclusion - Updated pyproject.toml with build system and entry points Co-authored-by: RockChinQ <[email protected]>
- Created GitHub Actions workflow to build frontend and publish to PyPI - Added license field to pyproject.toml to fix deprecation warning - Updated .gitignore to exclude build artifacts - Tested package building successfully Co-authored-by: RockChinQ <[email protected]>
- Created PYPI_INSTALLATION.md with detailed installation and usage instructions - Updated README.md to feature uvx/pip installation as recommended method - Updated README_EN.md with same changes for English documentation Co-authored-by: RockChinQ <[email protected]>
- Made package-data configuration more specific to langbot package only - Improved path detection with caching to avoid repeated file I/O - Removed sys.path searching which was incorrect for package data - Removed interactive input() call for non-interactive environment compatibility - Simplified error messages for version check Co-authored-by: RockChinQ <[email protected]>
- Use specific exception types instead of bare except - Fix misleading comments about directory levels - Remove redundant existence check before makedirs with exist_ok=True - Use context manager for file opening to ensure proper cleanup Co-authored-by: RockChinQ <[email protected]>
- Removed redundant package-data configuration, relying on MANIFEST.in - Added documentation about behavioral differences between package and source installation - Clarified that include-package-data=true uses MANIFEST.in for data files Co-authored-by: RockChinQ <[email protected]>
Copilot
AI
changed the title
[WIP] Add langbot as a distributable Python package
Add PyPI package support for uvx/pip installation
Nov 7, 2025
Copilot finished work on behalf of
RockChinQ
November 7, 2025 14:12
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
eh: Feature
enhance: 新功能添加 / add new features
m: Lifecycle
启动/关闭流程 / Bootstrap & application life cycle
m: Tools
工具(ToolUse、内容函数)相关 / Function Calling or tools management
size:XL
This PR changes 500-999 lines, ignoring generated files.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
概述 / Overview
实现了 LangBot 的 PyPI 包发布支持,用户可通过
uvx langbot或pip install langbot一键安装运行,无需克隆仓库或手动编译前端。Implemented PyPI package distribution for LangBot. Users can now install and run via
uvx langbotorpip install langbotwithout cloning the repository or building the frontend manually.核心变更 / Core Changes
包结构 / Package Structure
langbot/package with__main__.pyentry point for console script executionMANIFEST.into bundle frontend, templates, and resources in distributionpyproject.tomlwith build system config andlangbotconsole script entry point资源路径处理 / Resource Path Resolution
pkg/utils/paths.pyto locate resources in both source and installed package environmentsCI/CD
.github/workflows/publish-to-pypi.ymlto build frontend and publish to PyPI on release文档 / Documentation
docs/PYPI_INSTALLATION.mdwith installation and usage instructionsREADME.mdandREADME_EN.mdto feature uvx/pip as recommended installation method使用示例 / Usage Example
行为差异 / Behavioral Changes
data/directory in current working directory (not tied to project root)npm buildrequired)统计 / Statistics
16 files changed: +496 lines, -12 lines
检查清单 / Checklist
PR 作者完成 / For PR author
项目维护者完成 / For project maintainer
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
astral.shcurl -LsSf REDACTED(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.