Package: lightyears / 1.4-2

remove_startup_checks.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
66
67
68
69
70
Description: Remove unnecessary version checks from startup
Author: Siegfried-Angel Gevatter Pujals <rainct@ubuntu.com>

Index: lightyears-1.4/code/startup.py
===================================================================
--- lightyears-1.4.orig/code/startup.py	2011-07-20 01:27:43.000000000 +0200
+++ lightyears-1.4/code/startup.py	2011-07-22 00:48:00.000000000 +0200
@@ -3,60 +3,15 @@
 # This game is licensed under GPL v2, and copyright (C) Jack Whitham 2006.
 # 
 
-# Version check. This file can be much shorter for Debian.
+# Note: This file has been shortened a lot by Debian, removing startup
+# checks that shouldn't be necessary since dpkg takes care of them.
 
 import sys 
 
-def Check_Version():
-    fault = False
-    if ( sys.__dict__.has_key("version_info" ) ):
-        (major, minor, micro, releaselevel, serial) = sys.version_info
-        if (( major < 2 )
-        or (( major == 2 ) and ( minor < 4 ))):
-            fault = True
-    else:
-        major = 1
-        minor = 0
-        fault = True
-
-    if ( fault ):
-        print ""
-        print "Python 2 version 2.4 or higher is required."
-        print "You appear to be using version",(str(major) + "." + str(minor))
-        sys.exit(1)
-    
-    try:
-        import pygame
-    except:
-        print ""
-        print "Pygame does not appear to be installed."
-        print "Please install the latest version from http://www.pygame.org/"
-        sys.exit(1)
-  
-    try:
-        # God damn! The size of this field changed between 
-        # ver. 1.6 and ver. 1.7. Arrgh. 
-        [major, minor] = list(pygame.version.vernum)[ 0:2 ]
-        x = pygame.version.ver
-    except:
-        print ""
-        print "Pygame is installed, but you have an old version."
-        print "Please install the latest version from http://www.pygame.org/"
-        sys.exit(1)
-
-    if (( major < 1 )
-    or ( major == 1 ) and ( minor < 7 )):
-        print ""
-        print "Pygame version 1.7.x or higher is required."
-        print "Please install the latest version from http://www.pygame.org/"
-        sys.exit(1)
-
-
 def Get_Game_Version():
     return "1.3"
 
 def Main(data_dir, ignore = None):
-    Check_Version()
     import main
     main.Main(data_dir)