Closed denizkoekden closed 2 years ago
I solved this by creating a file "spatialmedia" containing
#!/bin/bash
python /opt/spatial-media/spatialmedia "$@"
make it executeable with chmod +x and the I moved it to /bin/spatialmedia
This works but I would like to know what the "correct" way would be.
The spatialmedia binary was supposed to be a script file that calls the spatialmedia Python module with all arguments. I.e. something like this, in e.g. /usr/local/bin/spatialmedia
(or elsewhere on your PATH):
#!/bin/sh
python -m spatialmedia $@
Assuming python /opt/spatial-media/spatialmedia "$@"
works for you, then that would also be fine. I suppose the Python package can end up in different locations on the system, but the script assumes that it's installed as a Python module via pip
, in which case calling it via python -m spatialmedia
should always work. I'll make sure to add a note on this in the README.
Okay thanks! So I was on the right track.
Hello, I tried everything to get spatialmedia installed as package / binary. The linked git repo from google tells me to use spatialmedia like this "python spatialmedia" and this script checks for "spatialmedia" like if its a linked binary. How to compile spatialmedia so it gets installed like this?