mystmd 1.1.39__tar.gz → 1.1.41__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.
- mystmd-1.1.41/.gitignore +5 -0
- {mystmd-1.1.39/mystmd.egg-info → mystmd-1.1.41}/PKG-INFO +16 -10
- mystmd-1.1.41/_package.json +50 -0
- mystmd-1.1.41/pyproject.toml +51 -0
- mystmd-1.1.41/src/mystmd_py/main.py +40 -0
- {mystmd-1.1.39 → mystmd-1.1.41/src}/mystmd_py/myst.cjs +23051 -10322
- mystmd-1.1.39/MANIFEST.in +0 -3
- mystmd-1.1.39/PKG-INFO +0 -66
- mystmd-1.1.39/mystmd.egg-info/SOURCES.txt +0 -13
- mystmd-1.1.39/mystmd.egg-info/dependency_links.txt +0 -1
- mystmd-1.1.39/mystmd.egg-info/entry_points.txt +0 -2
- mystmd-1.1.39/mystmd.egg-info/top_level.txt +0 -1
- mystmd-1.1.39/mystmd_py/main.py +0 -45
- mystmd-1.1.39/setup.cfg +0 -36
- mystmd-1.1.39/setup.py +0 -3
- {mystmd-1.1.39 → mystmd-1.1.41}/LICENSE +0 -0
- {mystmd-1.1.39 → mystmd-1.1.41}/README.md +0 -0
- {mystmd-1.1.39 → mystmd-1.1.41/src}/mystmd_py/__init__.py +0 -0
mystmd-1.1.41/.gitignore
ADDED
@@ -1,24 +1,30 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: mystmd
|
3
|
-
Version: 1.1.
|
3
|
+
Version: 1.1.41
|
4
4
|
Summary: Command line tools for MyST Markdown
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
5
|
+
Project-URL: Homepage, https://github.com/executablebooks/mystmd
|
6
|
+
Project-URL: Bug Tracker, https://github.com/executablebooks/mystmd/issues
|
7
|
+
Project-URL: Repository, https://github.com/executablebooks/mystmd.git
|
8
|
+
Author-email: Rowan Cockett <rowan@curvenote.com>
|
9
|
+
License-Expression: MIT
|
10
|
+
License-File: LICENSE
|
11
|
+
Keywords: latex,markdown,pdf-generation,science-research,scientific-visualization,writing-software
|
9
12
|
Classifier: Intended Audience :: Science/Research
|
10
13
|
Classifier: License :: OSI Approved :: MIT License
|
11
14
|
Classifier: Operating System :: OS Independent
|
12
15
|
Classifier: Programming Language :: JavaScript
|
13
16
|
Classifier: Programming Language :: Python :: 3
|
14
|
-
Classifier: Programming Language :: Python :: 3.6
|
15
|
-
Classifier: Programming Language :: Python :: 3.7
|
16
17
|
Classifier: Programming Language :: Python :: 3.8
|
17
18
|
Classifier: Programming Language :: Python :: 3.9
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
18
22
|
Classifier: Topic :: Scientific/Engineering
|
19
|
-
Requires-Python: >=3.
|
23
|
+
Requires-Python: >=3.8
|
24
|
+
Provides-Extra: execute
|
25
|
+
Requires-Dist: ipykernel; extra == 'execute'
|
26
|
+
Requires-Dist: jupyter-server; extra == 'execute'
|
20
27
|
Description-Content-Type: text/markdown
|
21
|
-
License-File: LICENSE
|
22
28
|
|
23
29
|
# MyST Markdown Command Line Interface, `mystmd`
|
24
30
|
|
@@ -63,4 +69,4 @@ conda config --set channel_priority strict
|
|
63
69
|
conda install mystmd
|
64
70
|
myst init
|
65
71
|
myst build my-doc.md --tex
|
66
|
-
```
|
72
|
+
```
|
@@ -0,0 +1,50 @@
|
|
1
|
+
{
|
2
|
+
"name": "mystmd",
|
3
|
+
"version": "1.1.41",
|
4
|
+
"description": "Command line tools for MyST Markdown",
|
5
|
+
"author": "Rowan Cockett <rowan@curvenote.com>",
|
6
|
+
"license": "MIT",
|
7
|
+
"type": "module",
|
8
|
+
"keywords": [
|
9
|
+
"markdown",
|
10
|
+
"latex",
|
11
|
+
"writing-software",
|
12
|
+
"scientific-visualization",
|
13
|
+
"pdf-generation",
|
14
|
+
"science-research"
|
15
|
+
],
|
16
|
+
"files": [
|
17
|
+
"dist"
|
18
|
+
],
|
19
|
+
"repository": {
|
20
|
+
"type": "git",
|
21
|
+
"url": "https://github.com/executablebooks/mystmd.git"
|
22
|
+
},
|
23
|
+
"bugs": {
|
24
|
+
"url": "https://github.com/executablebooks/mystmd/issues"
|
25
|
+
},
|
26
|
+
"homepage": "https://github.com/executablebooks/mystmd",
|
27
|
+
"bin": {
|
28
|
+
"myst": "./dist/myst.cjs"
|
29
|
+
},
|
30
|
+
"scripts": {
|
31
|
+
"clean": "rimraf dist",
|
32
|
+
"unlink": "npm uninstall -g mystmd",
|
33
|
+
"link": "npm run unlink; npm link;",
|
34
|
+
"copy:version": "echo \"const version = '\"$npm_package_version\"';\nexport default version;\" > src/version.ts",
|
35
|
+
"dev": "npm run link && esbuild src/index.ts --bundle --outfile=dist/myst.cjs --platform=node --external:fsevents --watch",
|
36
|
+
"lint": "npm run copy:version; eslint \"src/**/!(*.spec).ts\" -c ./.eslintrc.cjs",
|
37
|
+
"lint:format": "npm run copy:version; prettier --check \"src/**/*.ts\"",
|
38
|
+
"test": "npm run link; npm run copy:version; vitest run",
|
39
|
+
"test:watch": "npm run link; npm run copy:version; vitest watch",
|
40
|
+
"build:cli": "esbuild src/index.ts --bundle --outfile=dist/myst.cjs --platform=node --external:fsevents --target=node14",
|
41
|
+
"build": "npm-run-all -l clean copy:version -p build:cli"
|
42
|
+
},
|
43
|
+
"devDependencies": {
|
44
|
+
"chalk": "^5.2.0",
|
45
|
+
"commander": "^10.0.1",
|
46
|
+
"core-js": "^3.31.1",
|
47
|
+
"js-yaml": "^4.1.0",
|
48
|
+
"myst-cli": "^1.1.41"
|
49
|
+
}
|
50
|
+
}
|
@@ -0,0 +1,51 @@
|
|
1
|
+
[build-system]
|
2
|
+
requires = ["hatchling", "hatch-nodejs-version"]
|
3
|
+
build-backend = "hatchling.build"
|
4
|
+
|
5
|
+
[project]
|
6
|
+
name = "mystmd"
|
7
|
+
dynamic = ["version", "description", "authors", "urls", "keywords", "license"]
|
8
|
+
readme = "README.md"
|
9
|
+
requires-python = ">=3.8"
|
10
|
+
classifiers = [
|
11
|
+
"Intended Audience :: Science/Research",
|
12
|
+
"License :: OSI Approved :: MIT License",
|
13
|
+
"Operating System :: OS Independent",
|
14
|
+
"Programming Language :: JavaScript",
|
15
|
+
"Programming Language :: Python :: 3",
|
16
|
+
"Programming Language :: Python :: 3.8",
|
17
|
+
"Programming Language :: Python :: 3.9",
|
18
|
+
"Programming Language :: Python :: 3.10",
|
19
|
+
"Programming Language :: Python :: 3.11",
|
20
|
+
"Programming Language :: Python :: 3.12",
|
21
|
+
"Topic :: Scientific/Engineering",
|
22
|
+
]
|
23
|
+
|
24
|
+
[project.optional-dependencies]
|
25
|
+
execute = [
|
26
|
+
"ipykernel",
|
27
|
+
"jupyter-server",
|
28
|
+
]
|
29
|
+
|
30
|
+
[project.scripts]
|
31
|
+
myst = "mystmd_py.main:main"
|
32
|
+
|
33
|
+
[tool.hatch.version]
|
34
|
+
source = "nodejs"
|
35
|
+
path = "_package.json"
|
36
|
+
|
37
|
+
[tool.hatch.metadata.hooks.nodejs]
|
38
|
+
fields = ["description", "authors", "urls", "keywords", "license"]
|
39
|
+
path = "_package.json"
|
40
|
+
|
41
|
+
[tool.hatch.build.targets.sdist]
|
42
|
+
artifacts = [
|
43
|
+
"/_package.json",
|
44
|
+
"/src/mystmd_py/myst.cjs"
|
45
|
+
]
|
46
|
+
|
47
|
+
[tool.hatch.build.targets.wheel]
|
48
|
+
packages = ["src/mystmd_py"]
|
49
|
+
artifacts = [
|
50
|
+
"/src/mystmd_py/myst.cjs"
|
51
|
+
]
|
@@ -0,0 +1,40 @@
|
|
1
|
+
import os
|
2
|
+
import pathlib
|
3
|
+
import shutil
|
4
|
+
import subprocess
|
5
|
+
import sys
|
6
|
+
import re
|
7
|
+
|
8
|
+
|
9
|
+
def main():
|
10
|
+
NODE_LOCATION = (
|
11
|
+
shutil.which("node") or shutil.which("node.exe") or shutil.which("node.cmd")
|
12
|
+
)
|
13
|
+
PATH_TO_BIN_JS = (pathlib.Path(__file__).parent / "myst.cjs").resolve()
|
14
|
+
|
15
|
+
if not NODE_LOCATION:
|
16
|
+
raise SystemExit(
|
17
|
+
"You must install node >=16 to run MyST\n\n"
|
18
|
+
"We recommend installing the latest LTS release, using your preferred package manager\n"
|
19
|
+
"or following instructions here: https://nodejs.org/en/download"
|
20
|
+
)
|
21
|
+
node = pathlib.Path(NODE_LOCATION).resolve()
|
22
|
+
|
23
|
+
_version = subprocess.run([node, "-v"], capture_output=True, check=True, text=True).stdout
|
24
|
+
major_version_match = re.match(r"v(\d+).*", _version)
|
25
|
+
|
26
|
+
if major_version_match is None:
|
27
|
+
raise SystemExit(f"MyST could not determine the version of Node.js: {_version}")
|
28
|
+
|
29
|
+
major_version = int(major_version_match[1])
|
30
|
+
if not (major_version in {16, 18} or major_version >= 20):
|
31
|
+
raise SystemExit(
|
32
|
+
f"MyST requires node 16, 18, or 20+; you are running node {version[1:3]}.\n\n"
|
33
|
+
"Please update to the latest LTS release, using your preferred package manager\n"
|
34
|
+
"or following instructions here: https://nodejs.org/en/download"
|
35
|
+
)
|
36
|
+
os.execve(node, [node.name, PATH_TO_BIN_JS, *sys.argv[1:]], {**os.environ, "MYST_LANG": "PYTHON"})
|
37
|
+
|
38
|
+
|
39
|
+
if __name__ == "__main__":
|
40
|
+
main()
|