Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add better project file support for virtualenv usage #49

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jlujan
Copy link

@jlujan jlujan commented Mar 22, 2014

Added code to find the project file and add $project_path var in
the settings file to prefix other paths. Also did this for
$working_dir. This is to avoid hard coded paths to virtualenvs
in your project settings. Getting the project file is straight
forward in ST3. In ST2, the code will search open folders to find
the first *.sublime-project file and load settings using JSON

  • Add ability to use $project_path in settings paths
  • Add ability to use $working_dir in settings paths

Added code to find the project file and add $project_path var in
the settings file to prefix other paths. Also did this for
$working_dir. This is to avoid hard coded paths to virtualenvs
in your project settings. Getting the project file is straight
forward in ST3. In ST2, the code will search open folders to find
the first *.sublime-project file and load settings using JSON

* Add ability to use $project_path in settings paths
* Add ability to use $working_dir in settings paths
@jlujan
Copy link
Author

jlujan commented Mar 22, 2014

I have tested this for my use cases in ST3 and ST2 using the following project file.

{
"folders": [
{
    "path": "/path/to/project/venv/"
}
],
...
"settings":
    {
        "python_interpreter_path": "$project_path/bin/python", #hacked Jedi like this as well
        "pylinter":
        {
            "working_dir": "$project_path",
            "python_bin": "$project_path/bin/python",
            "pylint_rc": "$project_path/.pylintrc"
        }
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant