tunacode-cli 0.0.63__py3-none-any.whl → 0.0.64__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of tunacode-cli might be problematic. Click here for more details.
- tunacode/cli/commands/implementations/system.py +50 -0
- tunacode/constants.py +1 -1
- {tunacode_cli-0.0.63.dist-info → tunacode_cli-0.0.64.dist-info}/METADATA +1 -1
- {tunacode_cli-0.0.63.dist-info → tunacode_cli-0.0.64.dist-info}/RECORD +7 -7
- {tunacode_cli-0.0.63.dist-info → tunacode_cli-0.0.64.dist-info}/WHEEL +0 -0
- {tunacode_cli-0.0.63.dist-info → tunacode_cli-0.0.64.dist-info}/entry_points.txt +0 -0
- {tunacode_cli-0.0.63.dist-info → tunacode_cli-0.0.64.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"""System-level commands for TunaCode CLI."""
|
|
2
2
|
|
|
3
|
+
import os
|
|
3
4
|
import shutil
|
|
4
5
|
import subprocess
|
|
5
6
|
import sys
|
|
@@ -107,6 +108,26 @@ class UpdateCommand(SimpleCommand):
|
|
|
107
108
|
except (subprocess.TimeoutExpired, subprocess.CalledProcessError):
|
|
108
109
|
pass
|
|
109
110
|
|
|
111
|
+
# Check if installed via venv (from install script)
|
|
112
|
+
if not installation_method:
|
|
113
|
+
venv_dir = os.path.expanduser("~/.tunacode-venv")
|
|
114
|
+
venv_tunacode = os.path.join(venv_dir, "bin", "tunacode")
|
|
115
|
+
venv_python = os.path.join(venv_dir, "bin", "python")
|
|
116
|
+
|
|
117
|
+
if os.path.exists(venv_tunacode) and os.path.exists(venv_python):
|
|
118
|
+
try:
|
|
119
|
+
# Try python -m pip first (works with UV-created venvs)
|
|
120
|
+
result = subprocess.run(
|
|
121
|
+
[venv_python, "-m", "pip", "show", "tunacode-cli"],
|
|
122
|
+
capture_output=True,
|
|
123
|
+
text=True,
|
|
124
|
+
timeout=10,
|
|
125
|
+
)
|
|
126
|
+
if result.returncode == 0:
|
|
127
|
+
installation_method = "venv"
|
|
128
|
+
except (subprocess.TimeoutExpired, subprocess.CalledProcessError):
|
|
129
|
+
pass
|
|
130
|
+
|
|
110
131
|
# Check if installed via pip
|
|
111
132
|
if not installation_method:
|
|
112
133
|
try:
|
|
@@ -138,6 +159,35 @@ class UpdateCommand(SimpleCommand):
|
|
|
138
159
|
text=True,
|
|
139
160
|
timeout=60,
|
|
140
161
|
)
|
|
162
|
+
elif installation_method == "venv":
|
|
163
|
+
venv_dir = os.path.expanduser("~/.tunacode-venv")
|
|
164
|
+
venv_python = os.path.join(venv_dir, "bin", "python")
|
|
165
|
+
|
|
166
|
+
# Check if uv is available (same logic as install script)
|
|
167
|
+
if shutil.which("uv"):
|
|
168
|
+
await ui.info("Updating via UV in venv...")
|
|
169
|
+
result = subprocess.run(
|
|
170
|
+
[
|
|
171
|
+
"uv",
|
|
172
|
+
"pip",
|
|
173
|
+
"install",
|
|
174
|
+
"--python",
|
|
175
|
+
venv_python,
|
|
176
|
+
"--upgrade",
|
|
177
|
+
"tunacode-cli",
|
|
178
|
+
],
|
|
179
|
+
capture_output=True,
|
|
180
|
+
text=True,
|
|
181
|
+
timeout=60,
|
|
182
|
+
)
|
|
183
|
+
else:
|
|
184
|
+
await ui.info("Updating via pip in venv...")
|
|
185
|
+
result = subprocess.run(
|
|
186
|
+
[venv_python, "-m", "pip", "install", "--upgrade", "tunacode-cli"],
|
|
187
|
+
capture_output=True,
|
|
188
|
+
text=True,
|
|
189
|
+
timeout=60,
|
|
190
|
+
)
|
|
141
191
|
else: # pip
|
|
142
192
|
await ui.info("Updating via pip...")
|
|
143
193
|
result = subprocess.run(
|
tunacode/constants.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
tunacode/__init__.py,sha256=yUul8igNYMfUrHnYfioIGAqvrH8b5BKiO_pt1wVnmd0,119
|
|
2
|
-
tunacode/constants.py,sha256=
|
|
2
|
+
tunacode/constants.py,sha256=ZswgmnVTy2xIvgk8bl_MbQKeO2ycsF6J8-skeAg6IaE,6100
|
|
3
3
|
tunacode/context.py,sha256=YtfRjUiqsSkk2k9Nn_pjb_m-AXyh6XcOBOJWtFI0wVw,2405
|
|
4
4
|
tunacode/exceptions.py,sha256=oDO1SVKOgjcKIylwqdbqh_g5my4roU5mB9Nv4n_Vb0s,3877
|
|
5
5
|
tunacode/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -18,7 +18,7 @@ tunacode/cli/commands/implementations/debug.py,sha256=ornvceGF4GbJd2OJXnnT9i9KpH
|
|
|
18
18
|
tunacode/cli/commands/implementations/development.py,sha256=I8jHgYY3VgjTU8its0D0ysruuVqKbNTBur0JjPIUIZA,2844
|
|
19
19
|
tunacode/cli/commands/implementations/model.py,sha256=uthx6IX9KwgwywNTDklkJpqCbaTX9h1_p-eVmqL73WQ,2245
|
|
20
20
|
tunacode/cli/commands/implementations/plan.py,sha256=iZtvdGPqvGqMr8_lYil8_8NOL1iyc54Bxtb0gb9VOnw,1825
|
|
21
|
-
tunacode/cli/commands/implementations/system.py,sha256=
|
|
21
|
+
tunacode/cli/commands/implementations/system.py,sha256=5Ig_7ws0egTH2ckIbEezQHgsyDyAQz2fOqdPqCmbpSE,10085
|
|
22
22
|
tunacode/cli/commands/implementations/template.py,sha256=YeFOjbKKfPswPCHPvlDUwXvg6J0MesyAyVsujiIgPbU,5482
|
|
23
23
|
tunacode/cli/commands/implementations/todo.py,sha256=Dtz5bgcuK2VXGPWEBBZQgnWUMYkRXNzTGf_qkVPLF2U,8125
|
|
24
24
|
tunacode/cli/repl_components/__init__.py,sha256=5ZjPJ3yUvZ5x6Vg9EYJ03-tdxfEEdmfradCmwSlVY3E,334
|
|
@@ -134,8 +134,8 @@ tunacode/utils/system.py,sha256=J8KqJ4ZqQrNSnM5rrJxPeMk9z2xQQp6dWtI1SKBY1-0,1112
|
|
|
134
134
|
tunacode/utils/text_utils.py,sha256=HAwlT4QMy41hr53cDbbNeNo05MI461TpI9b_xdIv8EY,7288
|
|
135
135
|
tunacode/utils/token_counter.py,sha256=dmFuqVz4ywGFdLfAi5Mg9bAGf8v87Ek-mHU-R3fsYjI,2711
|
|
136
136
|
tunacode/utils/user_configuration.py,sha256=Ilz8dpGVJDBE2iLWHAPT0xR8D51VRKV3kIbsAz8Bboc,3275
|
|
137
|
-
tunacode_cli-0.0.
|
|
138
|
-
tunacode_cli-0.0.
|
|
139
|
-
tunacode_cli-0.0.
|
|
140
|
-
tunacode_cli-0.0.
|
|
141
|
-
tunacode_cli-0.0.
|
|
137
|
+
tunacode_cli-0.0.64.dist-info/METADATA,sha256=Qh7-DTPFkOqpaPQqaSBCE3wj1QPkHf9a2_v-vDhvhiI,10930
|
|
138
|
+
tunacode_cli-0.0.64.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
139
|
+
tunacode_cli-0.0.64.dist-info/entry_points.txt,sha256=hbkytikj4dGu6rizPuAd_DGUPBGF191RTnhr9wdhORY,51
|
|
140
|
+
tunacode_cli-0.0.64.dist-info/licenses/LICENSE,sha256=Btzdu2kIoMbdSp6OyCLupB1aRgpTCJ_szMimgEnpkkE,1056
|
|
141
|
+
tunacode_cli-0.0.64.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|