asta-code-execution 0.1.2__tar.gz → 0.1.4__tar.gz
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.
- {asta_code_execution-0.1.2 → asta_code_execution-0.1.4}/PKG-INFO +1 -1
- {asta_code_execution-0.1.2 → asta_code_execution-0.1.4}/pyproject.toml +1 -1
- {asta_code_execution-0.1.2 → asta_code_execution-0.1.4}/src/code_execution/process_backend.py +14 -3
- {asta_code_execution-0.1.2 → asta_code_execution-0.1.4}/README.md +0 -0
- {asta_code_execution-0.1.2 → asta_code_execution-0.1.4}/src/code_execution/__init__.py +0 -0
- {asta_code_execution-0.1.2 → asta_code_execution-0.1.4}/src/code_execution/executor.py +0 -0
- {asta_code_execution-0.1.2 → asta_code_execution-0.1.4}/src/code_execution/ipython_session.py +0 -0
- {asta_code_execution-0.1.2 → asta_code_execution-0.1.4}/src/code_execution/py.typed +0 -0
{asta_code_execution-0.1.2 → asta_code_execution-0.1.4}/src/code_execution/process_backend.py
RENAMED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
+
import importlib.metadata
|
|
5
6
|
import json
|
|
6
7
|
import os
|
|
7
8
|
import shutil
|
|
@@ -148,10 +149,20 @@ class ProcessIPythonBackend:
|
|
|
148
149
|
text=True,
|
|
149
150
|
)
|
|
150
151
|
|
|
151
|
-
# Install code_execution package
|
|
152
|
-
|
|
152
|
+
# Install code_execution package so the sandbox runner can import it.
|
|
153
|
+
# In the workspace dev layout, packages/code_execution/pyproject.toml is
|
|
154
|
+
# three levels up from this file; install editable from there. When the
|
|
155
|
+
# parent process is running from a normal site-packages install, that
|
|
156
|
+
# path is the site-packages parent dir (no pyproject.toml), so fall back
|
|
157
|
+
# to installing the published wheel pinned to the loaded version.
|
|
158
|
+
code_exec_pkg = Path(__file__).resolve().parent.parent.parent
|
|
159
|
+
if (code_exec_pkg / "pyproject.toml").is_file():
|
|
160
|
+
install_spec = ["-e", str(code_exec_pkg)]
|
|
161
|
+
else:
|
|
162
|
+
version = importlib.metadata.version("asta-code-execution")
|
|
163
|
+
install_spec = [f"asta-code-execution=={version}"]
|
|
153
164
|
subprocess.run(
|
|
154
|
-
[uv, "pip", "install", "--python", str(python_bin),
|
|
165
|
+
[uv, "pip", "install", "--python", str(python_bin), *install_spec],
|
|
155
166
|
check=True,
|
|
156
167
|
capture_output=True,
|
|
157
168
|
text=True,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{asta_code_execution-0.1.2 → asta_code_execution-0.1.4}/src/code_execution/ipython_session.py
RENAMED
|
File without changes
|
|
File without changes
|