Skip to content

fix: jupytext ignoring python3_host_prog#26

Open
PlatyPew wants to merge 3 commits intoGCBallesteros:mainfrom
PlatyPew:main
Open

fix: jupytext ignoring python3_host_prog#26
PlatyPew wants to merge 3 commits intoGCBallesteros:mainfrom
PlatyPew:main

Conversation

@PlatyPew
Copy link

@PlatyPew PlatyPew commented Jul 4, 2024

Jupytext will now use the python3_host_prog if it is set
Fixes #24

Signed-off-by: Platy <daryl.limkz@gmail.com>
@nicobuzeta
Copy link

Would be nice to have this merged since it is expected behaviour.

@abhinavnatarajan
Copy link

If I understand the neovim documentation correctly, g:python3_host_prog is the path to the Python executable for remote Python plugins, not for CLI tools. This pull request would break expected behaviour. CLI tools like jupytext should either be installed system-wide (using pipx install jupytext or uv tool install jupytext or some equivalent), or one should set VIRTUAL_ENV before starting neovim if jupytext is installed in a project directory.

@samyilin
Copy link

molten-nvim will use Python packages installed in g:python3_host_prog, for example. That is to say, plugins should be able to leverage what's installed in g:python3_host_prog. Technically molten-mvim is a python plugin and Jupytext is a Lua plugin, yes, but Jupytext is a plugin used for Python, so it's in a weird position, I'm not disagreeing with that.

Jupytext is a CLI tool yes, but it's also a Python package. Let's not forget that. And it can be treated as such.

VIRTUAL_ENV would be set for the project to be worked on, not for a plugin dependency. installing jupytext in project to be worked on would be pointless, no?

Plus, it would be really convenient to manage all Python dependencies required by Neovim plugins in the same place without having to go through hoops of using uv or pipx.

@PlatyPew
Copy link
Author

I've updated the PR to prioritise any system-wide installations of Jupytext (as long as it's in $PATH). It will only use the Jupytext Python package installed within g:python3_host_prog as a fallback.

This way it does not break any existing configurations, but also allows jupytext to be installed in the same place as other Neovim plugins as an alternative.

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.

Doesn't utilize virtual environment

4 participants