mystmd 1.3.1__py3-none-any.whl → 1.3.3__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.
- {mystmd-1.3.1.dist-info → mystmd-1.3.3.dist-info}/METADATA +1 -1
- mystmd-1.3.3.dist-info/RECORD +8 -0
- mystmd_py/main.py +12 -6
- mystmd_py/myst.cjs +2611 -1683
- mystmd-1.3.1.dist-info/RECORD +0 -8
- {mystmd-1.3.1.dist-info → mystmd-1.3.3.dist-info}/WHEEL +0 -0
- {mystmd-1.3.1.dist-info → mystmd-1.3.3.dist-info}/entry_points.txt +0 -0
- {mystmd-1.3.1.dist-info → mystmd-1.3.3.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,8 @@
|
|
1
|
+
mystmd_py/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
|
+
mystmd_py/main.py,sha256=BaPniv8thshA5DKIBoq2huFUs1Jb0zFkMxN2UIHXUkw,1511
|
3
|
+
mystmd_py/myst.cjs,sha256=Xq49AB9KLxnM6JNNLyf7vYIhOr_Sc8tMsEm0NCnXrLs,13093067
|
4
|
+
mystmd-1.3.3.dist-info/METADATA,sha256=A3ilDq0AI8AdYHU89B19jStpaLCw_O7GgtDNgA2f3aE,2954
|
5
|
+
mystmd-1.3.3.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
6
|
+
mystmd-1.3.3.dist-info/entry_points.txt,sha256=eC2ol2gqS2q5E-ktkMrBSvV0tckGUcNGS-c4hEQ-_V4,45
|
7
|
+
mystmd-1.3.3.dist-info/licenses/LICENSE,sha256=4BcikqvulW5nh_MxaocO-lC7ydIX23dMbcqtNTUSxr4,1082
|
8
|
+
mystmd-1.3.3.dist-info/RECORD,,
|
mystmd_py/main.py
CHANGED
@@ -18,23 +18,29 @@ def main():
|
|
18
18
|
"We recommend installing the latest LTS release, using your preferred package manager\n"
|
19
19
|
"or following instructions here: https://nodejs.org/en/download"
|
20
20
|
)
|
21
|
-
node = pathlib.Path(NODE_LOCATION).
|
21
|
+
node = pathlib.Path(NODE_LOCATION).absolute()
|
22
22
|
|
23
|
-
_version = subprocess.run(
|
23
|
+
_version = subprocess.run(
|
24
|
+
[node, "-v"], capture_output=True, check=True, text=True
|
25
|
+
).stdout
|
24
26
|
major_version_match = re.match(r"v(\d+).*", _version)
|
25
|
-
|
27
|
+
|
26
28
|
if major_version_match is None:
|
27
29
|
raise SystemExit(f"MyST could not determine the version of Node.js: {_version}")
|
28
30
|
|
29
31
|
major_version = int(major_version_match[1])
|
30
32
|
if not (major_version in {18, 20, 22} or major_version > 22):
|
31
33
|
raise SystemExit(
|
32
|
-
f"MyST requires node 18, 20, or 22+; you are running node {
|
34
|
+
f"MyST requires node 18, 20, or 22+; you are running node {major_version}.\n\n"
|
33
35
|
"Please update to the latest LTS release, using your preferred package manager\n"
|
34
36
|
"or following instructions here: https://nodejs.org/en/download"
|
35
37
|
)
|
36
|
-
os.execve(
|
37
|
-
|
38
|
+
os.execve(
|
39
|
+
node,
|
40
|
+
[node.name, PATH_TO_BIN_JS, *sys.argv[1:]],
|
41
|
+
{**os.environ, "MYST_LANG": "PYTHON"},
|
42
|
+
)
|
43
|
+
|
38
44
|
|
39
45
|
if __name__ == "__main__":
|
40
46
|
main()
|