Skip to content

How to tell company-jedi / jedi-core / python-environment to use a Tramp virtualenv? #18

@jennykwan

Description

@jennykwan

I probably don't understand virtualenv implementation well enough, but I simply don't grok python-environment well enough to figure out how to use dir-locals.el on a remote Tramp-accessible-over-SSH server to tell local Emacs running company-jedi to load a particular remote virtualenv for this project (using Projectile and Helm).

(I'm on a consulting engagement with a large Silicon Valley tech centered company that is very constraining. Remote servers are required for development; I cannot check out code locally. These boxen don't get network access to PyPi. I'm doing data engineering and their Airflow-equivalent is indirected away so the Python codebase I'm interacting with is deployed into the Airflow-equivalent source tree so I had to reverse engineer their build process to get the Airflow-equivalent Python code and its dependencies loaded into a remote virtualenv. This is the last yak I want to shave, but the lack of autocomplete is killing me. /vent)

So:

  1. What vars do I need to customize to use a virtualenv?
  2. Will this work with Tramp if both the base Python and the virtualenv are both remote?
  3. Would a remote .dir-locals.el at the project root work? I.e. does the Jedi-containing Python load late enough such that I can customize at the project root level, and have Tramp fetches respect that?

I'm more than happy to help write docs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions