-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add command descriptions to JSON lift manifest. (#44)
Previously these were gathered from the TOML lift manifest but not propagated to the JSON lift manifest in the built scie. Fixes #43
- Loading branch information
Showing
5 changed files
with
72 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,6 @@ | |
|
||
from packaging.version import Version | ||
|
||
__version__ = "0.2.0" | ||
__version__ = "0.2.1" | ||
|
||
VERSION = Version(__version__) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
[lift] | ||
name = "command-descriptions" | ||
description = "Test command decription propagation." | ||
|
||
[[lift.interpreters]] | ||
id = "cpython" | ||
provider = "PythonBuildStandalone" | ||
version = "3.10" | ||
lazy = true | ||
|
||
[[lift.commands]] | ||
description = "Print a JSON object of command descriptions by name." | ||
exe = "#{cpython:python}" | ||
args = [ | ||
"-c", | ||
""" | ||
import json | ||
import sys | ||
with open(r"{scie.lift}") as fp: | ||
data = json.load(fp) | ||
def get_description(command_name: str) -> str | None: | ||
return data["scie"]["lift"]["boot"]["commands"][command_name].get("description") | ||
json.dump( | ||
{{command_name: get_description(command_name) for command_name in ("", "version")}, sys.stdout | ||
) | ||
""" | ||
] | ||
|
||
[[lift.commands]] | ||
name = "version" | ||
exe = "#{cpython:python}" | ||
args = ["-V"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters