about summary refs log tree commit diff
path: root/pkgs/applications/networking/instant-messengers/blink/pythonpath.patch
diff options
context:
space:
mode:
authorMichiel Leenaars <ml.software@leenaa.rs>2016-03-12 22:33:00 +0100
committerMichiel Leenaars <ml.software@leenaa.rs>2016-03-12 22:33:00 +0100
commit6db4b907b8df946eb668aa01c997ecac4509a03e (patch)
tree2d692f6dfc56938899ae117e2726e7b7b6534c3c /pkgs/applications/networking/instant-messengers/blink/pythonpath.patch
parent2f24bef7828736466b5cb5a553be447ad75cb4d5 (diff)
downloadnixlib-6db4b907b8df946eb668aa01c997ecac4509a03e.tar
nixlib-6db4b907b8df946eb668aa01c997ecac4509a03e.tar.gz
nixlib-6db4b907b8df946eb668aa01c997ecac4509a03e.tar.bz2
nixlib-6db4b907b8df946eb668aa01c997ecac4509a03e.tar.lz
nixlib-6db4b907b8df946eb668aa01c997ecac4509a03e.tar.xz
nixlib-6db4b907b8df946eb668aa01c997ecac4509a03e.tar.zst
nixlib-6db4b907b8df946eb668aa01c997ecac4509a03e.zip
blinkqt: 1.4.1 -> 2.0.0
Diffstat (limited to 'pkgs/applications/networking/instant-messengers/blink/pythonpath.patch')
-rw-r--r--pkgs/applications/networking/instant-messengers/blink/pythonpath.patch45
1 files changed, 37 insertions, 8 deletions
diff --git a/pkgs/applications/networking/instant-messengers/blink/pythonpath.patch b/pkgs/applications/networking/instant-messengers/blink/pythonpath.patch
index 723e097ea826..0df8bc84ff30 100644
--- a/pkgs/applications/networking/instant-messengers/blink/pythonpath.patch
+++ b/pkgs/applications/networking/instant-messengers/blink/pythonpath.patch
@@ -1,14 +1,44 @@
-diff -rupN a/blink/resources.py b/blink/resources.py
---- a/blink/resources.py	2015-03-17 03:24:06.000000000 -0600
-+++ b/blink/resources.py	2015-04-07 22:52:06.101096413 -0600
-@@ -60,14 +60,7 @@ class Resources(object):
+--- blink-2.0.0/blink/resources.py	2016-03-09 14:39:07.000000000 +0100
++++ blink-2.0.0/blink/resources-patched.py	2016-03-12 21:34:14.965476623 +0100
+@@ -1,7 +1,10 @@
++# Copyright (C) 2010-2013 AG Projects. See LICENSE for details.
++#
+ 
+ """Provide access to Blink's resources"""
+ 
+-import __main__
++__all__ = ['ApplicationData', 'Resources', 'IconManager']
++
+ import imghdr
+ import os
+ import platform
+@@ -19,14 +22,10 @@
+ from blink.util import run_in_gui_thread
+ 
+ 
+-__all__ = ['ApplicationData', 'Resources', 'IconManager']
+-
+-
+ class DirectoryContextManager(unicode):
+     def __enter__(self):
+         self.directory = os.getcwdu()
+         os.chdir(self)
+-
+     def __exit__(self, type, value, traceback):
+         os.chdir(self.directory)
+ 
+@@ -61,18 +60,7 @@
      @classproperty
      def directory(cls):
          if cls._cached_directory is None:
--            if sys.path[0] == '':
--                application_directory = os.path.realpath('') # executed in interactive interpreter
+-            try:
+-                binary_directory = os.path.dirname(os.path.realpath(__main__.__file__))
+-            except AttributeError:
+-                if hasattr(sys, 'frozen'):
+-                    application_directory = os.path.dirname(os.path.realpath(sys.executable))
+-                else:
+-                    application_directory = os.path.realpath('')  # executed in interactive interpreter
 -            else:
--                binary_directory = os.path.dirname(os.path.realpath(sys.argv[0]))
 -                if os.path.basename(binary_directory) == 'bin':
 -                    application_directory = os.path.dirname(binary_directory)
 -                else:
@@ -17,4 +47,3 @@ diff -rupN a/blink/resources.py b/blink/resources.py
              if os.path.exists(os.path.join(application_directory, 'resources', 'blink.ui')):
                  cls._cached_directory = os.path.join(application_directory, 'resources').decode(sys.getfilesystemencoding())
              else:
-Binary files a/blink/.resources.py.swp and b/blink/.resources.py.swp differ