Expand Python module search path
to work around the issue that the gajim module cannot be found
This commit is contained in:
parent
ab041963b1
commit
6d1c659b4b
11
Makefile.am
11
Makefile.am
|
@ -11,14 +11,17 @@ EXTRA_DIST = \
|
||||||
intltool-merge.in \
|
intltool-merge.in \
|
||||||
intltool-update.in \
|
intltool-update.in \
|
||||||
win \
|
win \
|
||||||
scripts/gajim \
|
scripts/gajim.in \
|
||||||
scripts/gajim-history-manager \
|
scripts/gajim-history-manager.in \
|
||||||
scripts/gajim-remote
|
scripts/gajim-remote.in
|
||||||
|
|
||||||
DISTCLEANFILES = \
|
DISTCLEANFILES = \
|
||||||
intltool-extract \
|
intltool-extract \
|
||||||
intltool-merge \
|
intltool-merge \
|
||||||
intltool-update
|
intltool-update \
|
||||||
|
scripts/gajim \
|
||||||
|
scripts/gajim-remote \
|
||||||
|
scripts/gajim-history-manager
|
||||||
|
|
||||||
MAINTAINERCLEANFILES = \
|
MAINTAINERCLEANFILES = \
|
||||||
configure \
|
configure \
|
||||||
|
|
|
@ -41,6 +41,7 @@ AM_PATH_PYTHON([3.5])
|
||||||
AC_SUBST([gajim_srcdir], [\${pkgpythondir}])
|
AC_SUBST([gajim_srcdir], [\${pkgpythondir}])
|
||||||
AC_SUBST([gajim_pluginsdir], [\${datadir}/\${PACKAGE}/plugins])
|
AC_SUBST([gajim_pluginsdir], [\${datadir}/\${PACKAGE}/plugins])
|
||||||
|
|
||||||
|
AS_AC_EXPAND(PY_SITEDIR, "${pythondir}")
|
||||||
AS_AC_EXPAND(GAJIM_SRCDIR, "${gajim_srcdir}")
|
AS_AC_EXPAND(GAJIM_SRCDIR, "${gajim_srcdir}")
|
||||||
AS_AC_EXPAND(PKGDATADIR, "${datadir}/${PACKAGE}")
|
AS_AC_EXPAND(PKGDATADIR, "${datadir}/${PACKAGE}")
|
||||||
AS_AC_EXPAND(DOCDIR, "${docdir}")
|
AS_AC_EXPAND(DOCDIR, "${docdir}")
|
||||||
|
@ -65,6 +66,9 @@ AC_CONFIG_FILES([
|
||||||
data/gajim-remote.desktop.in
|
data/gajim-remote.desktop.in
|
||||||
data/defs.py
|
data/defs.py
|
||||||
gajim/Makefile
|
gajim/Makefile
|
||||||
|
scripts/gajim
|
||||||
|
scripts/gajim-history-manager
|
||||||
|
scripts/gajim-remote
|
||||||
po/Makefile.in
|
po/Makefile.in
|
||||||
plugins/Makefile
|
plugins/Makefile
|
||||||
])
|
])
|
||||||
|
|
|
@ -27,6 +27,8 @@ if sys.platform != 'win32':
|
||||||
if os.geteuid() == 0:
|
if os.geteuid() == 0:
|
||||||
sys.exit("You must not launch gajim as root, it is insecure.")
|
sys.exit("You must not launch gajim as root, it is insecure.")
|
||||||
|
|
||||||
|
sys.path.append("@PY_SITEDIR@")
|
||||||
|
|
||||||
import gi
|
import gi
|
||||||
gi.require_version('Gtk', '3.0')
|
gi.require_version('Gtk', '3.0')
|
||||||
from gi.repository import Gtk
|
from gi.repository import Gtk
|
|
@ -26,6 +26,8 @@ import sys
|
||||||
if os.geteuid() == 0:
|
if os.geteuid() == 0:
|
||||||
sys.exit("You must not launch gajim as root, it is insecure.")
|
sys.exit("You must not launch gajim as root, it is insecure.")
|
||||||
|
|
||||||
|
sys.path.append("@PY_SITEDIR@")
|
||||||
|
|
||||||
import gajim.gajim_remote as g
|
import gajim.gajim_remote as g
|
||||||
|
|
||||||
g.GajimRemote()
|
g.GajimRemote()
|
|
@ -27,6 +27,8 @@ if sys.platform != 'win32':
|
||||||
if os.geteuid() == 0:
|
if os.geteuid() == 0:
|
||||||
sys.exit("You must not launch gajim as root, it is insecure.")
|
sys.exit("You must not launch gajim as root, it is insecure.")
|
||||||
|
|
||||||
|
sys.path.append("@PY_SITEDIR@")
|
||||||
|
|
||||||
import gajim.gajim as g
|
import gajim.gajim as g
|
||||||
|
|
||||||
g.GajimApplication().run(sys.argv)
|
g.GajimApplication().run(sys.argv)
|
Loading…
Reference in New Issue