MCPcopy Create free account
hub / github.com/coldtype/st2 / install_extras

Function install_extras

ST2/importer.py:123–152  ·  view source on GitHub ↗
(context, global_vars)

Source from the content-addressed store, hash-verified

121
122
123def install_extras(context, global_vars):
124 from subprocess import run
125
126 print("---"*20)
127 print("> INSTALLING EXTRAS")
128 print("---"*20)
129
130 time.sleep(0.25)
131
132 venv_location = Path(__file__).parent / "st2_venv"
133 venv_python = venv_location / "bin/python"
134
135 if not venv_python.exists():
136 venv_python = venv_location / "Scripts/python.exe"
137
138 print(venv_python, venv_python.exists())
139
140 packages = ["ufo2ft"]
141
142 if sys.platform == "darwin":
143 packages[:0] = ["pyobjc-core", "pyobjc-framework-Cocoa", "pyobjc-framework-CoreText"]
144
145 run([venv_python, "-m", "pip", "install", *packages])
146
147 #run([venv_python, "-m", "pip", "install", "pyobjc-core", "pyobjc-framework-Cocoa", "pyobjc-framework-CoreText", "ufo2ft"])
148
149 run([venv_python, "-m", "pip", "freeze"])
150 time.sleep(0.25)
151
152 return
153
154
155def editor_needs_coldtype(layout, status):

Callers 1

executeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected