Package: pymol / 2.4.0+dfsg-2

02_test-suite.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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
Author: Michael Banck <mbanck@debian.org>
Description: Patch to make the test-suite work during debian build-time.
Forwarded: not-needed

Index: pymol/test/pymol-test
===================================================================
--- /dev/null
+++ pymol/test/pymol-test
@@ -0,0 +1,43 @@
+#!/usr/bin/env python
+# NOTE: This file is now obsolete.  However it has been left functional
+# and intact in order to promote backwards compatibility with existing
+# PyMOL installs.
+#
+# Future installations should launch pymol by running:
+#   "python $PYMOL_PATH/modules/pymol/__init__.py" instead.
+# or
+#   by importing "pymol" from within a standalone Python script
+#   followed immediately by a call to pymol.finish_launching()
+
+import thread
+import threading
+import os
+import sys
+import time
+import __main__
+
+# let pymol/__init__.py known that we're launching using the old way
+
+__main__.pymol_launch = 0
+
+if hasattr(__main__,"pymol_argv"):
+   pymol_argv = __main__.pymol_argv
+else:
+   pymol_argv = sys.argv
+
+modules_path = '../debian/pymol/usr/lib/python' + sys.version[0:3] + '/site-packages'
+
+if modules_path not in sys.path:
+   sys.path.append(modules_path
+
+modules_path = '../debian/pymol/usr/lib/python' + sys.version[0:3] + '/dist-packages'
+
+if modules_path not in sys.path:
+   sys.path.append(modules_path)
+
+import pymol
+
+pymol.invocation.parse_args(pymol_argv)
+
+pymol.start_pymol()
+
Index: pymol/test/run
===================================================================
--- pymol.orig/test/run
+++ pymol/test/run
@@ -34,7 +34,7 @@ if len(argv):
 
 # ---
 
-cmd = os.getenv("PYMOL", "../pymol") + ' -k'
+cmd = os.getenv("PYMOL", "./pymol-test") + ' -k'
 
 diff_cmd = "diff -b"