[PR #557] [MERGED] feat: prioritize pyproject.toml when installing plugin dependencies #579

Closed
opened 2026-02-16 01:16:23 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify-plugin-daemon/pull/557
Author: @Stream29
Created: 1/6/2026
Status: Merged
Merged: 1/12/2026
Merged by: @Yeuoly

Base: mainHead: feat/pyproject-compability


📝 Commits (9)

  • 2b84810 feat: prioritize pyproject.toml when installing plugin dependencies
  • d024100 refactor: rename variable for clarity in SDK version extraction logic
  • 48fca38 refactor: use local_runtime.ConstructPluginRuntime
  • 5cf4fca refactor: use local_runtime.ConstructPluginRuntime
  • 19245e3 refactor: fail when uv not found
  • 34c60bb refactor: use more realistic test plugin data
  • 619d689 refactor: don't accept dependencyFileType other than pyprojectTomlFile and requirementsTxtFile
  • 62739ca refactor: use type-safe constant to replace hard-coded string
  • b06c958 refactor: use factory function of LocalPluginRuntime

📊 Changes

33 files changed (+1036 additions, -20 deletions)

View changed files

internal/core/local_runtime/dependency_installation_integration_test.go (+311 -0)
internal/core/local_runtime/dependency_installation_test.go (+300 -0)
📝 internal/core/local_runtime/environment_python.go (+17 -6)
📝 internal/core/local_runtime/patch.go (+10 -8)
📝 internal/core/local_runtime/setup_python_environment.go (+68 -6)
internal/core/local_runtime/testdata/plugin-with-both/main.py (+6 -0)
internal/core/local_runtime/testdata/plugin-with-both/manifest.yaml (+26 -0)
internal/core/local_runtime/testdata/plugin-with-both/provider/test_provider.py (+6 -0)
internal/core/local_runtime/testdata/plugin-with-both/provider/test_provider.yaml (+14 -0)
internal/core/local_runtime/testdata/plugin-with-both/pyproject.toml (+10 -0)
internal/core/local_runtime/testdata/plugin-with-both/requirements.txt (+1 -0)
internal/core/local_runtime/testdata/plugin-with-both/tools/test_tool.py (+12 -0)
internal/core/local_runtime/testdata/plugin-with-both/tools/test_tool.yaml (+13 -0)
internal/core/local_runtime/testdata/plugin-with-pyproject/main.py (+6 -0)
internal/core/local_runtime/testdata/plugin-with-pyproject/manifest.yaml (+26 -0)
internal/core/local_runtime/testdata/plugin-with-pyproject/provider/test_provider.py (+6 -0)
internal/core/local_runtime/testdata/plugin-with-pyproject/provider/test_provider.yaml (+14 -0)
internal/core/local_runtime/testdata/plugin-with-pyproject/pyproject.toml (+10 -0)
internal/core/local_runtime/testdata/plugin-with-pyproject/tools/test_tool.py (+12 -0)
internal/core/local_runtime/testdata/plugin-with-pyproject/tools/test_tool.yaml (+13 -0)

...and 13 more files

📄 Description

Description

Accept and prioritize pyproject.toml when installing plugin dependencies.

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Performance improvement
  • Other

Essential Checklist

Testing

  • I have tested the changes locally and confirmed they work as expected
  • I have added unit tests where necessary and they pass successfully

Additional Information

Please provide any additional context that would help reviewers understand the changes.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langgenius/dify-plugin-daemon/pull/557 **Author:** [@Stream29](https://github.com/Stream29) **Created:** 1/6/2026 **Status:** ✅ Merged **Merged:** 1/12/2026 **Merged by:** [@Yeuoly](https://github.com/Yeuoly) **Base:** `main` ← **Head:** `feat/pyproject-compability` --- ### 📝 Commits (9) - [`2b84810`](https://github.com/langgenius/dify-plugin-daemon/commit/2b84810512b11532b5cb23b127cba9da48e26285) feat: prioritize `pyproject.toml` when installing plugin dependencies - [`d024100`](https://github.com/langgenius/dify-plugin-daemon/commit/d0241009aeeea4999cf53c04784517e03f205ad4) refactor: rename variable for clarity in SDK version extraction logic - [`48fca38`](https://github.com/langgenius/dify-plugin-daemon/commit/48fca38911613596acdf6dc17b50db9dc9d2fe34) refactor: use local_runtime.ConstructPluginRuntime - [`5cf4fca`](https://github.com/langgenius/dify-plugin-daemon/commit/5cf4fca57724b79671857f70acf910fd899a3ab6) refactor: use local_runtime.ConstructPluginRuntime - [`19245e3`](https://github.com/langgenius/dify-plugin-daemon/commit/19245e3bdaabcf80d5a2afaafd69380e2aefa600) refactor: fail when uv not found - [`34c60bb`](https://github.com/langgenius/dify-plugin-daemon/commit/34c60bb6fca7c04dd3c14682cc68eec0883567eb) refactor: use more realistic test plugin data - [`619d689`](https://github.com/langgenius/dify-plugin-daemon/commit/619d689d84a3448eb8c13a625c5b2cca7a369a75) refactor: don't accept dependencyFileType other than pyprojectTomlFile and requirementsTxtFile - [`62739ca`](https://github.com/langgenius/dify-plugin-daemon/commit/62739ca99818072c768dbc9af08555a214801c11) refactor: use type-safe constant to replace hard-coded string - [`b06c958`](https://github.com/langgenius/dify-plugin-daemon/commit/b06c9584f47e179be0e8235de631a7cf327fd998) refactor: use factory function of LocalPluginRuntime ### 📊 Changes **33 files changed** (+1036 additions, -20 deletions) <details> <summary>View changed files</summary> ➕ `internal/core/local_runtime/dependency_installation_integration_test.go` (+311 -0) ➕ `internal/core/local_runtime/dependency_installation_test.go` (+300 -0) 📝 `internal/core/local_runtime/environment_python.go` (+17 -6) 📝 `internal/core/local_runtime/patch.go` (+10 -8) 📝 `internal/core/local_runtime/setup_python_environment.go` (+68 -6) ➕ `internal/core/local_runtime/testdata/plugin-with-both/main.py` (+6 -0) ➕ `internal/core/local_runtime/testdata/plugin-with-both/manifest.yaml` (+26 -0) ➕ `internal/core/local_runtime/testdata/plugin-with-both/provider/test_provider.py` (+6 -0) ➕ `internal/core/local_runtime/testdata/plugin-with-both/provider/test_provider.yaml` (+14 -0) ➕ `internal/core/local_runtime/testdata/plugin-with-both/pyproject.toml` (+10 -0) ➕ `internal/core/local_runtime/testdata/plugin-with-both/requirements.txt` (+1 -0) ➕ `internal/core/local_runtime/testdata/plugin-with-both/tools/test_tool.py` (+12 -0) ➕ `internal/core/local_runtime/testdata/plugin-with-both/tools/test_tool.yaml` (+13 -0) ➕ `internal/core/local_runtime/testdata/plugin-with-pyproject/main.py` (+6 -0) ➕ `internal/core/local_runtime/testdata/plugin-with-pyproject/manifest.yaml` (+26 -0) ➕ `internal/core/local_runtime/testdata/plugin-with-pyproject/provider/test_provider.py` (+6 -0) ➕ `internal/core/local_runtime/testdata/plugin-with-pyproject/provider/test_provider.yaml` (+14 -0) ➕ `internal/core/local_runtime/testdata/plugin-with-pyproject/pyproject.toml` (+10 -0) ➕ `internal/core/local_runtime/testdata/plugin-with-pyproject/tools/test_tool.py` (+12 -0) ➕ `internal/core/local_runtime/testdata/plugin-with-pyproject/tools/test_tool.yaml` (+13 -0) _...and 13 more files_ </details> ### 📄 Description ## Description Accept and prioritize `pyproject.toml` when installing plugin dependencies. ## Type of Change - [ ] Bug fix - [x] New feature - [ ] Refactor - [ ] Performance improvement - [ ] Other ## Essential Checklist ### Testing - [x] I have tested the changes locally and confirmed they work as expected - [x] I have added unit tests where necessary and they pass successfully ## Additional Information Please provide any additional context that would help reviewers understand the changes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 01:16:23 -05:00
yindo closed this issue 2026-02-16 01:16:23 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-plugin-daemon#579