@weaxs/openclaw-stock-analysis 0.1.6 → 0.1.7
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.
- package/dist/index.js +4 -3
- package/index.ts +6 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4438,12 +4438,13 @@ var here = dirname(fileURLToPath(import.meta.url));
|
|
|
4438
4438
|
var toolsDir = existsSync(join(here, "tools")) ? join(here, "tools") : join(here, "..", "tools");
|
|
4439
4439
|
var repoRoot = dirname(toolsDir);
|
|
4440
4440
|
var isWin = process.platform === "win32";
|
|
4441
|
-
var
|
|
4442
|
-
var
|
|
4441
|
+
var venvBin = join(".venv", isWin ? "Scripts" : "bin", isWin ? "python.exe" : "python3");
|
|
4442
|
+
var venvPython = join(repoRoot, venvBin);
|
|
4443
|
+
var parentVenvPython = join(repoRoot, "..", venvBin);
|
|
4443
4444
|
function pythonBin() {
|
|
4444
4445
|
if (existsSync(venvPython)) return venvPython;
|
|
4445
4446
|
if (existsSync(parentVenvPython)) return parentVenvPython;
|
|
4446
|
-
return "python3";
|
|
4447
|
+
return isWin ? "python" : "python3";
|
|
4447
4448
|
}
|
|
4448
4449
|
async function runPy(script, args) {
|
|
4449
4450
|
return executor(pythonBin(), [join(toolsDir, script), ...args]);
|
package/index.ts
CHANGED
|
@@ -27,15 +27,18 @@ const toolsDir = existsSync(join(here, "tools"))
|
|
|
27
27
|
: join(here, "..", "tools");
|
|
28
28
|
const repoRoot = dirname(toolsDir);
|
|
29
29
|
const isWin = process.platform === "win32";
|
|
30
|
-
|
|
30
|
+
// Windows venvs ship Scripts/python.exe (there is no python3); POSIX venvs ship bin/python3.
|
|
31
|
+
const venvBin = join(".venv", isWin ? "Scripts" : "bin", isWin ? "python.exe" : "python3");
|
|
32
|
+
const venvPython = join(repoRoot, venvBin);
|
|
31
33
|
// Staged-payload layout (openclaw/tools present in a dev checkout): the venv
|
|
32
34
|
// still lives at the repo root one level up.
|
|
33
|
-
const parentVenvPython = join(repoRoot, "..",
|
|
35
|
+
const parentVenvPython = join(repoRoot, "..", venvBin);
|
|
34
36
|
|
|
35
37
|
function pythonBin(): string {
|
|
36
38
|
if (existsSync(venvPython)) return venvPython;
|
|
37
39
|
if (existsSync(parentVenvPython)) return parentVenvPython;
|
|
38
|
-
|
|
40
|
+
// On Windows "python3" is usually the Microsoft Store stub — prefer "python".
|
|
41
|
+
return isWin ? "python" : "python3";
|
|
39
42
|
}
|
|
40
43
|
|
|
41
44
|
async function runPy(script: string, args: string[]): Promise<string> {
|
package/package.json
CHANGED