Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 27, 2025

Currently Python dependencies can only be installed by package name. Users need support for GitHub URLs and automatic dependency detection from subscription repositories.

Changes

Backend (back/config/util.ts)

  • Added getInstallCommand() logic to handle:
    • GitHub URLs: git+https://github.com/user/repo.git or https://github.com/user/repo/archive/main.zip
    • Requirements files: requirements.txt, requirements-dev.txt, requirements.in
    • pyproject.toml: installs from containing directory
  • Modified getGetCommand() to skip version checks for URLs and requirement files (prevents false install detection)
  • Extracted helper functions (isGitHubUrl(), isRequirementsFile(), isPyprojectToml()) for cleaner pattern matching

Shell (shell/update.sh)

  • Added auto_install_python_deps() to detect and auto-install from subscription repos
  • Copies requirements/pyproject files to scripts directory
  • Creates dependency tasks via API with error handling

Frontend (src/pages/dependence/modal.tsx)

  • Added dynamic tooltip and placeholder for Python dependencies
  • Updates based on selected dependency type

Example Usage

// Now supports:
name: "requests"                           // Package name (existing)
name: "git+https://github.com/user/repo.git"  // GitHub URL (new)
name: "path/to/requirements.txt"           // Requirements file (new)
name: "path/to/pyproject.toml"             // pyproject.toml (new)

When subscriptions update, requirements.txt and pyproject.toml are automatically detected and queued for installation.

Original prompt

This section details on the original issue you should resolve

<issue_title>希望Python模块添加更多的安装方法,而不是只能输入名称</issue_title>
<issue_description>### Clear and concise description of the problem

目前python订阅需要手动安装依赖,并且只能通过依赖名称进行安装。

Suggested solution

我希望运行订阅时可以自动安装订阅仓库中定义的依赖,并且可以通过其他方式安装。
1、可以通过github链接安装
2、识别订阅仓库中的 requirements.txt 或者 pyproject.toml 文件进行安装

Alternative

No response

Additional context

No response

Validations

  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@vercel
Copy link

vercel bot commented Dec 27, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
qinglong Ready Ready Preview, Comment Dec 27, 2025 8:53am
qinglong-back Ready Ready Preview, Comment Dec 27, 2025 8:53am

Copilot AI changed the title [WIP] Add more installation methods for Python module Add GitHub URL and requirements file support for Python dependencies Dec 27, 2025
Copilot AI requested a review from whyour December 27, 2025 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

希望Python模块添加更多的安装方法,而不是只能输入名称

2 participants