Package: pymol / 2.4.0+dfsg-2

22_fix_pymol_import.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Author: Michael Banck <mbanck@debian.org>
Description: Fix importing of pymol by setting PYMOL_PATH explicitly
Bug-Debian: http://bugs.debian.org/556878
Forwarded: not-needed

Index: pymol/modules/pymol/__init__.py
===================================================================
--- pymol.orig/modules/pymol/__init__.py
+++ pymol/modules/pymol/__init__.py
@@ -89,6 +89,7 @@ if IS_PY3:
 else:
     import thread
 
+from imp import find_module
 import copy
 import threading
 import re
@@ -200,6 +201,8 @@ def guess_pymol_path():
 
         # /usr/share/pymol
         os.path.join(sys.prefix, 'share', 'pymol'),
+
+        find_module('pymol')[1]
     ]
 
     for pymol_path in pymol_path_candidates: