Skip to content

Commit

Permalink
fixed installRequirements
Browse files Browse the repository at this point in the history
  • Loading branch information
jurgenvinju committed Feb 16, 2024
1 parent fff0825 commit c0b65c4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lang/python/Parse.rsc
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,16 @@ import ValueIO;
import String;
import List;

loc pythonBin = |file:///usr/local/bin/python3|;
loc pythonBin = exists(|PATH://python3|) ? |PATH://python3| : |PATH://python|;

@synopsis="Installs the ast2json Python library using pip3"
public void installRequirements() {
println(exec(pythonBin.path, args=["install", "ast2json"]));
println(exec(pythonBin, args=["-m", "pip", "install", "ast2json"]));
}

@synopsis="Retrieves the search path for Python files using the sys.path constant"
public list[loc] pythonPath() {
lst=exec(pythonBin.path, args=["-c", "import sys; print(sys.path)"]);
lst=exec(pythonBin, args=["-c", "import sys; print(sys.path)"]);
lst=visit (lst) {
case /\'/ => "\""
}
Expand Down

0 comments on commit c0b65c4

Please sign in to comment.