diff --git a/.gitignore b/.gitignore index f52e251..41f3d6d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,3 @@ *~ __pycache__ /build -/dist -/MANIFEST diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index af9266b..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1,2 +0,0 @@ -include etc/pylock.conf -include po/POTFILES.in po/pylock.pot po/*.po diff --git a/scripts/pylock b/bin/pylock similarity index 100% rename from scripts/pylock rename to bin/pylock diff --git a/po/POTFILES.in b/po/POTFILES.in deleted file mode 100644 index 8d634f0..0000000 --- a/po/POTFILES.in +++ /dev/null @@ -1,8 +0,0 @@ -[encoding: UTF-8] -pylock/__init__.py -pylock/Main.py -pylock/Locker.py -pylock/Selection.py -pylock/pam.py -pylock/LockWindow.py -[type: gettext/glade]pylock/data/unlock.ui diff --git a/po/de.po b/po/de.po index b012d29..d5a83ba 100644 --- a/po/de.po +++ b/po/de.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: pylock 0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-04-16 10:35+0200\n" +"POT-Creation-Date: 2013-04-12 16:37+0200\n" "PO-Revision-Date: 2012-02-01 19:30+0100\n" "Last-Translator: Matthias Schiffer \n" "Language-Team: German \n" @@ -16,11 +16,11 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ../pylock/LockWindow.py:123 +#: ../pylock/LockWindow.py:119 msgid "This computer is currently locked by the user {username}." msgstr "Dieser Computer ist zur Zeit vom Benutzer {username} gesperrt." -#: ../pylock/LockWindow.py:127 +#: ../pylock/LockWindow.py:123 msgid "" "This computer is currently locked by the user {username}.\n" "The user can be logged out in {minutes:02}:{seconds:02} minutes." @@ -28,7 +28,7 @@ msgstr "" "Dieser Computer ist zur Zeit vom Benutzer {username} gesperrt.\n" "Der Benutzer kann in {minutes:02}:{seconds:02} Minuten ausgeloggt werden." -#: ../pylock/LockWindow.py:132 +#: ../pylock/LockWindow.py:128 msgid "" "This computer is currently locked by the user {username}.\n" "The user can be logged out now." @@ -36,14 +36,14 @@ msgstr "" "Dieser Computer ist zur Zeit vom Benutzer {username} gesperrt.\n" "Der Benutzer kann jetzt ausgeloggt werden." -#: ../pylock/data/unlock.ui.h:1 +#: ../unlock.ui.h:1 msgid "Password:" msgstr "Passwort:" -#: ../pylock/data/unlock.ui.h:2 +#: ../unlock.ui.h:2 msgid "Unlock" msgstr "Entsperren" -#: ../pylock/data/unlock.ui.h:3 +#: ../unlock.ui.h:3 msgid "Logout" msgstr "Ausloggen" diff --git a/po/pylock.pot b/po/pylock.pot index 73397ab..1a5dcd9 100644 --- a/po/pylock.pot +++ b/po/pylock.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-04-16 10:35+0200\n" +"POT-Creation-Date: 2013-04-12 18:43+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/pylock.py b/pylock.py deleted file mode 100755 index 85579bb..0000000 --- a/pylock.py +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env python3 - -import os -import sys - -sys.path.insert(0, os.path.dirname(__file__)) - -from pylock import Main - -Main.main() diff --git a/pylock/Locker.py b/pylock/Locker.py index 56cd9e8..5243609 100644 --- a/pylock/Locker.py +++ b/pylock/Locker.py @@ -58,7 +58,7 @@ class Locker(object): if self.currentLogoutTimeout > 0: GLib.timeout_add_seconds(1, self._checkLogout) - return False + return True def unlock(self): if self.locked: diff --git a/pylock/Main.py b/pylock/Main.py index d42727b..7a2cbb9 100644 --- a/pylock/Main.py +++ b/pylock/Main.py @@ -64,7 +64,7 @@ def main(): locale.textdomain('pylock') if 'theme' in config: - Gtk.Settings.get_default().set_property('gtk-theme-name', config['theme']) + Gtk.Settings.get_defalt().set_property('gtk-theme-name', config['theme']) def waitForSelection(): if Selection.get() != 0: diff --git a/setup.py b/setup.py index 9b4e7d2..9034f0e 100755 --- a/setup.py +++ b/setup.py @@ -1,70 +1,29 @@ #!/usr/bin/env python3 -import distutils.core -import distutils.command.build -import distutils.command.install -import glob +import distutils +import DistUtilsExtra.auto import os -class build_pylock(distutils.command.build.build): - def run(self): - distutils.command.build.build.run(self) - - data_files = self.distribution.data_files - if data_files is None: - # in case not data_files are defined in setup.py - self.distribution.data_files = data_files = [] - - for po_file in glob.glob("po/*.po"): - lang = os.path.basename(po_file[:-3]) - mo_dir = os.path.join("build", "mo", lang, "LC_MESSAGES") - mo_file = os.path.join(mo_dir, "%s.mo" % self.distribution.metadata.name) - if not os.path.exists(mo_dir): - os.makedirs(mo_dir) - cmd = ["msgfmt", po_file, "-o", mo_file] - po_mtime = os.path.getmtime(po_file) - mo_mtime = os.path.exists(mo_file) and os.path.getmtime(mo_file) or 0 - if po_mtime > mo_mtime: - self.spawn(cmd) - - targetpath = os.path.join("share/locale", lang, "LC_MESSAGES") - data_files.append((targetpath, (mo_file,))) - class install_pylock(distutils.command.install.install): def run(self): - distutils.command.install.install.run(self) - - distutils.dir_util.copy_tree('etc', os.path.join(self.root, 'etc'), + distutils.dir_util.copy_tree('etc', os.path.join(self.root, '/etc'), preserve_times=0, preserve_symlinks=1, verbose=1) -distutils.core.setup( + distutils.command.install.install.run(self) + +DistUtilsExtra.auto.setup( name = 'pylock', - version = '3', - author = 'Matthias Schiffer', - author_email = 'mschiffer@universe-factory.net', - url = 'http://git.universe-factory.net/pylock/', - description = 'A lightweight screenlocker for X implemented in Python 3 using Gtk3', - license = 'BSD', + version = '1', + + data_files = [], packages = ['pylock'], package_data = { 'pylock': ['data/unlock.ui', 'data/bg.svg'], }, - scripts = ['scripts/pylock'], - cmdclass = { - 'build': build_pylock, 'install': install_pylock, }, - - provides = ['pylock'], - requires = [ - 'gi.repository.Gtk', - 'gi.repository.Gdk', - 'gi.repository.GdkX11', - 'gi.repository.GObject', - 'gi.repository.GLib', - ], )