vimPlugins.chadtree: add python dependencies
This commit is contained in:
@@ -149,6 +149,17 @@ self: super: {
|
||||
};
|
||||
};
|
||||
|
||||
chadtree = super.chadtree.overrideAttrs {
|
||||
passthru.python3Dependencies = ps: with ps; [
|
||||
pynvim-pp
|
||||
pyyaml
|
||||
std2
|
||||
];
|
||||
|
||||
# We need some patches so it stops complaining about not being in a venv
|
||||
patches = [ ./patches/chadtree/emulate-venv.patch ];
|
||||
};
|
||||
|
||||
ChatGPT-nvim = super.ChatGPT-nvim.overrideAttrs {
|
||||
dependencies = with self; [ nui-nvim plenary-nvim telescope-nvim ];
|
||||
};
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
diff --git a/chadtree/__main__.py b/chadtree/__main__.py
|
||||
index 83341fc..af8c9b0 100644
|
||||
--- a/chadtree/__main__.py
|
||||
+++ b/chadtree/__main__.py
|
||||
@@ -73,7 +73,7 @@ _EXEC_PATH = Path(executable)
|
||||
_EXEC_PATH = _EXEC_PATH.parent.resolve(strict=True) / _EXEC_PATH.name
|
||||
_REQ = REQUIREMENTS.read_text()
|
||||
|
||||
-_IN_VENV = _RT_PY == _EXEC_PATH
|
||||
+_IN_VENV = True
|
||||
|
||||
|
||||
if command == "deps":
|
||||
@@ -129,7 +129,7 @@ elif command == "run":
|
||||
try:
|
||||
if not _IN_VENV:
|
||||
raise ImportError()
|
||||
- elif lock != _REQ:
|
||||
+ elif False:
|
||||
raise ImportError()
|
||||
else:
|
||||
import pynvim_pp
|
||||
diff --git a/chadtree/consts.py b/chadtree/consts.py
|
||||
index e2d3aa0..e77a129 100644
|
||||
--- a/chadtree/consts.py
|
||||
+++ b/chadtree/consts.py
|
||||
@@ -1,4 +1,5 @@
|
||||
from os import environ, name
|
||||
+from pathlib import Path
|
||||
|
||||
from chad_types import TOP_LEVEL
|
||||
|
||||
@@ -24,7 +25,7 @@ SETTINGS_VAR = "chadtree_settings"
|
||||
STORAGE
|
||||
"""
|
||||
|
||||
-_VARS = TOP_LEVEL / ".vars"
|
||||
+_VARS = Path.home() / ".cache/chadtree/vars"
|
||||
RT_DIR = _VARS / "runtime"
|
||||
RT_PY = RT_DIR / "Scripts" / "python.exe" if IS_WIN else RT_DIR / "bin" / "python3"
|
||||
SESSION_DIR = _VARS / "sessions"
|
||||
Reference in New Issue
Block a user