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

Build-in support for pipenv / Pipfile #717

Open
hyperknot opened this issue Oct 26, 2017 · 4 comments
Open

Build-in support for pipenv / Pipfile #717

hyperknot opened this issue Oct 26, 2017 · 4 comments

Comments

@hyperknot
Copy link

hyperknot commented Oct 26, 2017

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:

  • it only worked if everyone used the default ~/.virtualenvs location
  • didn't work across OS-es.

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
Copy link
Owner

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
Copy link
Author

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

@hyperknot
Copy link
Author

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

@dumptyd
Copy link

dumptyd commented Jun 10, 2018

Any progress on this?

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

No branches or pull requests

3 participants