diff options
-rw-r--r-- | Makefile | 18 | ||||
-rwxr-xr-x | isodumper | 2 | ||||
-rwxr-xr-x | lib/isodumper.py | 35 |
3 files changed, 29 insertions, 26 deletions
@@ -17,7 +17,8 @@ PREFIX=/usr BINDIR=$(PREFIX)/bin SBINDIR=$(PREFIX)/sbin LIBDIR=$(PREFIX)/lib -PYLIBDIR=$(shell python3 -c "from __future__ import print_function; from distutils.sysconfig import get_python_lib; print(get_python_lib())") +PYTHON=/usr/bin/env python3 +PYLIBDIR=$(shell $(PYTHON) -c "from __future__ import print_function; from distutils.sysconfig import get_python_lib; print(get_python_lib())") LIBEXECDIR=$(PREFIX)/libexec POLKITPOLICYDIR=$(PREFIX)/share/polkit-1/actions DATADIR=$(PREFIX)/share @@ -25,7 +26,6 @@ ICONSDIR=$(PREFIX)/share/icons PIXMAPSDIR=$(PREFIX)/share/pixmaps LOCALEDIR=$(PREFIX) DOCDIR=$(PREFIX)/share/doc/isodumper -PYTHON=/usr/bin/env python3 SYSCONFDIR=/etc DIRS = polkit POFILES = po @@ -56,12 +56,18 @@ clean: isodumper.tar.xz -install: +install: version # for binary file script isodumper on /usr/bin mkdir -p $(DESTDIR)$(BINDIR) install -m 755 isodumper $(DESTDIR)$(BINDIR) + # for PYLIBFILES isodumper.py version.py raw_write.py + mkdir -p $(DESTDIR)$(PYLIBDIR)/isodumper + install -m 755 lib/isodumper.py $(DESTDIR)$(PYLIBDIR)/isodumper + install -m 755 lib/version.py $(DESTDIR)$(PYLIBDIR)/isodumper + install -m 755 backend/raw_write.py $(DESTDIR)$(PYLIBDIR)/isodumper + # for backend magiback listening DBus on /usr/bin/ install -m 755 backend/magiback $(DESTDIR)$(BINDIR) @@ -84,12 +90,6 @@ install: mkdir -p $(DESTDIR)$(POLKITPOLICYDIR) install -m 644 polkit/org.mageia.isodumper.policy $(DESTDIR)$(POLKITPOLICYDIR) - # for PYLIBFILES isodumper.py version.py raw_write.py - mkdir -p $(DESTDIR)$(PYLIBDIR)/isodumper - install -m 755 lib/isodumper.py $(DESTDIR)$(PYLIBDIR)/isodumper - install -m 755 lib/version.py $(DESTDIR)$(PYLIBDIR)/isodumper - install -m 755 backend/raw_write.py $(DESTDIR)$(PYLIBDIR)/isodumper - # for LIBFILES raw_format.py mkdir -p $(DESTDIR)$(LIBDIR)/isodumper install -m 755 lib/raw_format.py $(DESTDIR)$(LIBDIR)/isodumper @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 from isodumper import isodumper import manatools.args as args from isodumper import version diff --git a/lib/isodumper.py b/lib/isodumper.py index 9bde522..4770837 100755 --- a/lib/isodumper.py +++ b/lib/isodumper.py @@ -1,6 +1,6 @@ # coding:utf-8 -# !/usr/bin/python3 +# !/usr/bin/env python3 # # Copyright (c) 2007-2009 Canonical Ltd. # @@ -33,8 +33,7 @@ try: except: import version -sys.path.insert(0, '../../../build/swig/python3') -importlib.reload(sys) + ########### # imports # ########### @@ -530,8 +529,9 @@ class IsoDumper(object): self.write_logfile() self.dialog.destroy() self.dialog = None - self.glib_loop.quit() - self.glib_thread.join() + #TODO REMOVE if it works as it seems + #self.glib_loop.quit() + #self.glib_thread.join() def write_logfile(self): logpath = os.path.join(os.path.expanduser('~'), '.isodumper') @@ -722,18 +722,21 @@ exFAT, NTFS or ext. You can specify a volume name and the format in a new dialog self.dialog.recalcLayout() self.ancrage.showChild() self.uEventQueue = SimpleQueue() - self.glib_loop = GLib.MainLoop() - self.glib_thread = threading.Thread(target=self.glib_mainloop, args=(self.glib_loop,)) - self.glib_thread.start() - - - def glib_mainloop(self, loop): - ''' - thread function for glib main loop - listen to signal from udisks - ''' self.u.iface["org.freedesktop.DBus.ObjectManager"].InterfacesAdded.connect(self.device_changed) - loop.run() + #TODO REMOVE if it works as it seems + #self.glib_loop = GLib.MainLoop() + #self.glib_thread = threading.Thread(target=self.glib_mainloop, args=(self.glib_loop,)) + #self.glib_thread.start() + + #TODO REMOVE if it works as it seems + #def glib_mainloop(self, loop): + #''' + #thread function for glib main loop + #listen to signal from udisks + #''' + #self.u.iface["org.freedesktop.DBus.ObjectManager"].InterfacesAdded.connect(self.device_changed) + + #loop.run() def device_changed(self, a, b): self.uEventQueue.put({'event': "device-changed", 'value': True}) |