Skip to content

Instantly share code, notes, and snippets.

@chris-ramon
Forked from abrookins/gist:1933635
Last active October 13, 2015 18:58
Show Gist options
  • Save chris-ramon/4241136 to your computer and use it in GitHub Desktop.
Save chris-ramon/4241136 to your computer and use it in GitHub Desktop.
sublime build
// path of the file to override: /home/user/.config/sublime-text-2/Packages/Python/Python.sublime-build
// for simple scripts using virtualenv
{
"cmd": ["python", "-u", "$file"],
"env": {"PYTHONPATH": "/home/chris/venvs/venv-authorize-sauce/lib/python2.7/site-packages"},
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.python"
}
// test django
{
"folders":
[
{
"path": "django_project_dir"
},
{
"path": "lib/python2.7"
}
],
"build_systems":
[
{
"name": "Run Tests",
"working_dir": "${project_path}/django_project_dir",
"env": {"PYTHONPATH": "/path/to/envs/env_name/django_project_dir:/path/to/envs/env_name/lib/python2.7/site-packages"},
"cmd": ["python", "manage.py", "test", "--noinput"]
}
]
}
sources:
http://sublimetext.info/docs/en/reference/build_systems.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment