OpenFn / apollo

GNU Lesser General Public License v2.1
0 stars 2 forks source link

Find a better solution to manage python version #45

Open josephjclark opened 7 months ago

josephjclark commented 7 months ago

We have a little problem in our node-python set up

Right now, the node version is hard-coded in pyproject.toml and platform/src/bridge.ts. If the local python version drifts from this, the python bridge will break.

The problem is that we need to tell node-calls-python where the poetry environment is. And the poetry environment uses the minor python version in the path:

.venv/lib/python${PYTHON_VERSION}/site-packages

I have tried to write a function to scrap the python version from the shell. Bun has lovely apis for this. But the solution feels so flaky.

Hard-coding the python version, weirdly, actually feels like the best solution.

Possible solutions: