I have defined a project file that looks like this:
[code]{
“folders”:
{
"path": "./"
}
],
"build_systems":
{
"name": "Custom build system",
"path": "./virtualenv/Scripts",
"cmd": "where", "python"],
"env": {
"PYTHONPATH": "./"
}
}
]
}[/code]
This works perfectly as long as I’m on a file in the top level directory. As soon as I descend into a child directory, the “./” paths break and I get “not found” errors. Therefore I’m trying to use the “$project_path” variable that’s shown here: http://docs.sublimetext.info/en/latest/reference/build_systems.html#build-system-variables. The problem is: it doesn’t work at all. I get the same “not found” errors as before.
I have tried:
"path": "$project_path/virtualenv/Scripts"
"path": "${project_path}/virtualenv/Scripts"
"path": "${project_path}\\virtualenv\\Scripts"
and nothing works. Python.exe is still not found. I have also tried to leave “path” at the relative path and set PYTHONPATH to “$project_path”, then set “cmd” to
"python", "-c", "import sys;print sys.path"]
The output contains:
So it’s clear that in this case, “$project_path” isn’t even being replaced. It probably isn’t in the rest of the build system either. Why not? What am I doing wrong?