Created attachment 5 Support installing .py files as private modules in /usr/share When sat files are installed as private modules (e.g. in /usr/share/salutatoi), sat.tac is unable to find sat modules because sys.path is set to /usr/bin by twisted. This patch set the PYTHONPATH environment variable before running twisted so that sat modules can be found by sat.tac.
sat can't find its module if installed as private modulescreated
When sat files are installed as private modules (e.g. in /usr/share/salutatoi), sat.tac is unable to find sat modules because sys.path is set to /usr/bin by twisted. This patch set the PYTHONPATH environment variable before running twisted so that sat modules can be found by sat.tac. See attached for a patch fixing this issue.
Good that I forgot to attach the patch since it was incomplete. See an updated version.
Created attachment 11 New version of the patch Thomas' patch doesn't apply any more with 0.5, since both sat.sh and setup.py changed substantially. Please find the updated patch that we integrated in the Debian package.
G'day, thank for your patch but it's not OK yet for me (as discussed on the dev@ mailing list), here is a copy/paste of my comment: ### This one is not OK for me: it erase the PYTHONPATH when SàT is launched from the repository (i.e. without installation), and force it when SàT is installed. This is bad because PYTHONPATH is dependant of the way we want to launch SàT, for example I have two scripts: sat and sat_dev which launch SàT with different PYTHONPATH (the one for my main instance, and the one for the dev version, as explained here: http://wiki.goffi.org/wiki/Howto_launch_several_S%C3%A0T_instances); with you patch the scripts would not work anymore. As I'm not sure of the issue that you have, can you attach a complete backtrace to the bug report ? It's also better to continue the discussion there because else it will be difficult to track bug history. ### So please attach a copy of your exception, and if possible a ls of SàT installation to know exactly where module are, and a copy of your PYTHONPATH at the launch. There is not sat.tac anymore since SàT 0.5, it's now a twisted plugin. Cheers and thanks for your report/help.