#Setting up a Python exe sidecar

1 messages · Page 1 of 1 (latest)

mint wagon
#

Hello all!

I am trying to create a Tauri application that uses a Node (Nuxt/Vue) frontend and a Python FastAPI backend:

Here's a link to the project:
https://github.com/freemocap/skelly_viewer/tree/257a5e1f4cd90025feba98d57d061e6e649fcbd3

I am struggling to set up the Python/Pyinstaller binary as a sidecar

I have scripts that build a Python exectuable (via pyinstaller) in [root]/install/install-python.js and adds the 'triple' to the file name (per instructions in the docs https://tauri.app/v1/guides/building/sidecar). The executable builds to [root[/dist/src-python-executable-{triple}.exe on running npm run install-python

However, I think I have things set up incorrectly in the [repo]/src-tauri/tauri.conf.json file, because I get a lot of "can't find the executable" errors (will share in next message)

Questions:

  • What is the correct way to set the sidecar/binary paths and names and whatnot in the tauri.conf.json file? I've tried a number of configurations but can't get everything pointed in the right direction.

There's two spots where I have to specify the sidecar/binary/executable path, right? One in the allowlist section, and another in the bundle section? Should those be the same path? If I try to define a relative path, what is it relative to? the repo root? the tauri.conf.json location? |

Open to any help or suggestions for improving and streamlining the general layout of this project.

Thank you!!

GitHub

Contribute to freemocap/skelly_viewer development by creating an account on GitHub.

wraith geyser
#

The paths in tauri.conf.json are relative to the tauri.conf.json file, so i assume once you change src-python-executable to ../src-python-executable it should start to work.

mint wagon
#

Incidentally, I noticed that there was a stub section in the V2 docs related specifically to including Python sidecar binaries

#

Is there any work on that yet?

I would love to see what the recommendations are, and contribute how I can 😊

mint wagon
wraith geyser