CasterVoice / caster-core

GNU General Public License v3.0
1 stars 1 forks source link

Packaging bundle the Python interpreter #12

Open LexiconCode opened 3 years ago

LexiconCode commented 3 years ago

Having the correct Python interpreter is frustrating especially systems that already have it integrated as part of core functionality. This is usually on Mac and Linux.

Some other benefits

Timoses commented 3 years ago

True. MacOS Python is quite annoying to setup.

It would probably be possible to build something with every release / merge.

It would take some reading into to find out best approaches. Perhaps daanzu knows of some tricks. He points towards 'self-contained, portable, batteries-included (python & libraries & model) distribution of kaldi-active-grammar + dragonfly2.' (https://github.com/daanzu/kaldi-active-grammar#getting-started).

LexiconCode commented 3 years ago

Perhaps daanzu knows of some tricks. He uses winPython which comes with some pretty installed dependencies and so forth.

However is a little heavier than probably what we need winPython. When we can just download the zip version of Python and modify some scripts launching from that specific interpreter.

Here's my example bat script from winPython.

@echo off
call "%~dp0\WPy64-3820\scripts\env_for_icons.bat"
cd Caster

TITLE Caster: Status Window

echo Runnig Kaldi from Dragonfly CLI

"%WINPYDIR%\python.exe" -m dragonfly load _*.py --engine kaldi

Our version would need to be more advanced creating virtualenv. The next question is how to launch it would be nice not to have to rely on platform specific scripts like bat/sh

Timoses commented 3 years ago

This lists quite some options: https://packaging.python.org/overview/#bringing-your-own-python-executable

LexiconCode commented 3 years ago

This lists quite some options: packaging.python.org/overview/#bringing-your-own-python-executable

How do plug-ins in the user directory interact with an executable? Wouldn't they need to be pointed to a Python interpreter?

Timoses commented 3 years ago

I guess (or hope) when using a bundled application that pip is still usable. In that case it should work, since plugins are loaded using pip.