After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 312274 - gmenu-simple-editor should run regardless of python path
gmenu-simple-editor should run regardless of python path
Status: RESOLVED FIXED
Product: gnome-menus
Classification: Core
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: gnome-menus dummy account
gnome-menus dummy account
Depends on:
Blocks:
 
 
Reported: 2005-08-01 19:57 UTC by Wouter Bolsterlee (uws)
Modified: 2005-08-02 09:31 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Wouter Bolsterlee (uws) 2005-08-01 19:57:10 UTC
If gnome-menus is installed in a non-standard PREFIX and python's PATH settings
do not include this PREFIX, gmenu-simple-editor does not run because the python
module could not be loaded.

A simple fix is to include the following snippet into the gmenu-simple-editor
executable (this is a python script) containing the following lines:

import sys
sys.path = ["/path/to/dir"] + sys.path

This ensures that the program will run with the correct python package.

The path should be generated by some autoconf voodoo magic.
Comment 1 Mark McLoughlin 2005-08-02 09:31:43 UTC
Thanks

2005-08-02  Mark McLoughlin  <mark@skynet.ie>

        Allow running gmenu-simple-editor with a python
        from a different prefix. Fixes bug #312274

        * simple-editor/gmenu-simple-editor: remove

        * simple-editor/gmenu-simple-editor.in: if
        pyexecdir isn't in sys.path, insert it before
        trying to import main module.

        * simple-editor/Makefile.am: generate
        gmenu-simple-editor

        * simple-editor/GMenuSimpleEditor/main.py:
        add a main() function.