DamnWidget / anaconda

Anaconda turns your Sublime Text 3 in a full featured Python development IDE including autocompletion, code linting, IDE features, autopep8 formating, McCabe complexity checker Vagrant and Docker support for Sublime Text 3 using Jedi, PyFlakes, pep8, MyPy, PyLint, pep257 and McCabe that will never freeze your Sublime Text 3
http://damnwidget.github.io/anaconda/
GNU General Public License v3.0
2.21k stars 260 forks source link

Build-in support for pipenv / Pipfile #717

Open hyperknot opened 6 years ago

hyperknot commented 6 years ago

It seems that pipenv / Pipfile has a chance of turning to be the standard Python dependency management format, even included in the official docs as of Python 3.6.

Is there any way to add built-in Pipfile support in Anaconda? I understand that there ENV variable support, but I don't use them as I launch ST3 projects by opening .sublime-project files, not from command line.

With virtualenv-wrapper my solution was to put a project specific .anaconda file next to each .sublime-project file, with the following contents:

{
  "python_interpreter": "~/.virtualenvs/my_project/bin/python"
}

The problem with this was that:

Now with Pipfile we can finally solve this cleanly, without using .anaconda files, if there would be built-in support for Pipfile.

I don't know the internals of Anaconda, but I'd be willing to help if any help is needed in implementing Pipfile support. AFAIK, all what needs to be done is running pipenv --py to get the interpreter if a Pipfile is found.

Here is the other side of the discussion: https://github.com/kennethreitz/pipenv/issues/978

DamnWidget commented 6 years ago

Hi @hyperknot You just need to hook it into this function that is used to get anaconda settings https://github.com/DamnWidget/anaconda/blob/master/anaconda_lib/helpers.py#L197-L261

hyperknot commented 6 years ago

@DamnWidget thanks, that looks clean, I'll have a look at a PR.

hyperknot commented 6 years ago

720 is my PR, including some smarter caching for settings.

dumptyd commented 6 years ago

Any progress on this?