mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-11 04:08:09 +03:00
Replace python with sys.executable
This commit is contained in:
parent
8131a65dee
commit
82a03ee18e
|
@ -8,6 +8,7 @@ import shlex
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import shutil
|
import shutil
|
||||||
|
import sys
|
||||||
|
|
||||||
from ._app import app, Arg, Opt, COMMAND
|
from ._app import app, Arg, Opt, COMMAND
|
||||||
from .. import about
|
from .. import about
|
||||||
|
@ -190,8 +191,12 @@ def run_commands(commands: List[str] = tuple(), variables: Dict[str, str] = {})
|
||||||
for command in commands:
|
for command in commands:
|
||||||
# Substitute variables, e.g. "./{NAME}.json"
|
# Substitute variables, e.g. "./{NAME}.json"
|
||||||
command = command.format(**variables)
|
command = command.format(**variables)
|
||||||
print(command)
|
command = shlex.split(command)
|
||||||
run_command(shlex.split(command))
|
# TODO: is this needed / a good idea?
|
||||||
|
if len(command) and command[0] == "python":
|
||||||
|
command[0] = sys.executable
|
||||||
|
print(" ".join(command))
|
||||||
|
run_command(command)
|
||||||
|
|
||||||
|
|
||||||
def check_asset(url: str) -> None:
|
def check_asset(url: str) -> None:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user