-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathpip-venv-package-manager.json
More file actions
115 lines (115 loc) · 4.6 KB
/
Copy pathpip-venv-package-manager.json
File metadata and controls
115 lines (115 loc) · 4.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
{
"format": "ludash.custom-package-manager.v1",
"exportedAt": "2026-06-06T00:00:00.000Z",
"packageManager": {
"name": "pip-venv",
"label": "pip Virtualenv",
"parserConfig": null,
"configEntries": [
{
"key": "venvPath",
"description": "Python virtual environment directory.",
"defaultValue": "~/ludash-pip-venv"
}
]
},
"scripts": [
{
"name": "Check pip Virtualenv Updates",
"description": "Checks one Python virtual environment and emits stable dashboard parser lines.",
"type": "package_manager",
"operation": "check_updates",
"pkgManager": "pip-venv",
"isDefault": true,
"steps": [
{
"label": "Check pip virtualenv updates",
"command": "venv_path=\"{{config.venvPath}}\"\ncase \"$venv_path\" in \"~/\"*) venv_path=\"$HOME/${venv_path#??}\" ;; esac\npy=\"$venv_path/bin/python\"\n\"$py\" -m pip list --outdated --format=json 2>/dev/null | \"$py\" -c 'import json,sys\nfor p in json.load(sys.stdin):\n print(\"LUDASH_UPDATE %s %s %s\" % (p[\"name\"], p[\"version\"], p[\"latest_version\"]))'"
}
],
"parserConfig": {
"parseStep": 0,
"successExitCodes": [
0
],
"updateRegex": "^LUDASH_UPDATE\\s+(?<packageName>\\S+)\\s+(?<currentVersion>\\S+)\\s+(?<newVersion>\\S+)$"
},
"systemInfoConfig": null,
"sourceScriptId": null
},
{
"name": "Detect pip Virtualenv",
"description": "Checks whether the configured Python virtual environment is available.",
"type": "package_manager",
"operation": "detect",
"pkgManager": "pip-venv",
"isDefault": true,
"steps": [
{
"label": "Detect pip virtualenv",
"command": "venv_path=\"{{config.venvPath}}\"\ncase \"$venv_path\" in \"~/\"*) venv_path=\"$HOME/${venv_path#??}\" ;; esac\n[ -x \"$venv_path/bin/python\" ] && \"$venv_path/bin/python\" -m pip --version >/dev/null 2>&1 && echo found"
}
],
"parserConfig": null,
"systemInfoConfig": null,
"sourceScriptId": null
},
{
"name": "List Installed pip Virtualenv Packages",
"description": "Reports virtualenv packages for package inventory.",
"type": "package_manager",
"operation": "list_installed_packages",
"pkgManager": "pip-venv",
"isDefault": true,
"steps": [
{
"label": "List pip virtualenv packages",
"command": "venv_path=\"{{config.venvPath}}\"\ncase \"$venv_path\" in \"~/\"*) venv_path=\"$HOME/${venv_path#??}\" ;; esac\npy=\"$venv_path/bin/python\"\n\"$py\" -m pip list --format=json 2>/dev/null | \"$py\" -c 'import json,sys\nfor p in json.load(sys.stdin):\n print(\"LUDASH_PACKAGE %s %s\" % (p[\"name\"], p[\"version\"]))'"
}
],
"parserConfig": {
"parseStep": 0,
"successExitCodes": [
0
],
"installedPackageRegex": "^LUDASH_PACKAGE\\s+(?<packageName>\\S+)\\s+(?<currentVersion>\\S+)$"
},
"systemInfoConfig": null,
"sourceScriptId": null
},
{
"name": "Update All pip Virtualenv Packages",
"description": "Upgrades all outdated packages in the configured virtual environment.",
"type": "package_manager",
"operation": "upgrade_all",
"pkgManager": "pip-venv",
"isDefault": true,
"steps": [
{
"label": "Update pip virtualenv packages",
"command": "venv_path=\"{{config.venvPath}}\"\ncase \"$venv_path\" in \"~/\"*) venv_path=\"$HOME/${venv_path#??}\" ;; esac\npy=\"$venv_path/bin/python\"\nout=\"$(\"$py\" -m pip list --outdated --format=json 2>/dev/null)\"\npkgs=\"$(printf '%s' \"$out\" | \"$py\" -c 'import json,sys; print(\" \".join(p[\"name\"] for p in json.load(sys.stdin)))')\"\n[ -z \"$pkgs\" ] || \"$py\" -m pip install --upgrade $pkgs"
}
],
"parserConfig": null,
"systemInfoConfig": null,
"sourceScriptId": null
},
{
"name": "Update Selected pip Virtualenv Packages",
"description": "Upgrades the selected packages in the configured virtual environment.",
"type": "package_manager",
"operation": "upgrade_selected",
"pkgManager": "pip-venv",
"isDefault": true,
"steps": [
{
"label": "Update selected pip virtualenv packages",
"command": "venv_path=\"{{config.venvPath}}\"\ncase \"$venv_path\" in \"~/\"*) venv_path=\"$HOME/${venv_path#??}\" ;; esac\n\"$venv_path/bin/python\" -m pip install --upgrade {{quotedPackages}}"
}
],
"parserConfig": null,
"systemInfoConfig": null,
"sourceScriptId": null
}
]
}