File: py2app-python2.6.patch

package info (click to toggle)
keysync 0.2.1.1-1~bpo70%2B1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy-backports
  • size: 2,388 kB
  • sloc: python: 2,102; xml: 802; sh: 143; makefile: 4
file content (91 lines) | stat: -rw-r--r-- 2,823 bytes parent folder | download | duplicates (4)
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# HG changeset patch
# User Ronald Oussoren <ronaldoussoren@mac.com>
# Date 1362420069 -3600
# Branch branch-0.7
# Node ID 70438e65f35b38fff433c883942732bfbe7bb14b
# Parent  da87652fa58b23646d0ab08b46b0faac88315d0f
Fixes python 2.6 breakage

fixes #96

diff --git a/py2app/build_app.py b/py2app/build_app.py
--- a/py2app/build_app.py
+++ b/py2app/build_app.py
@@ -18,12 +18,6 @@
 from py2app.apptemplate.setup import main as script_executable
 from py2app.util import mergecopy, make_exec
 
-
-try:
-    import sysconfig
-except ImportError:
-    sysconfig = None
-
 try:
     from cStringIO import StringIO
 except ImportError:
@@ -499,8 +493,8 @@
             yield runtime
 
     def run(self):
-        if sysconfig.get_config_var('PYTHONFRAMEWORK') is None:
-            if not sysconfig.get_config_var('Py_ENABLE_SHARED'):
+        if get_config_var('PYTHONFRAMEWORK') is None:
+            if not get_config_var('Py_ENABLE_SHARED'):
                 raise DistutilsPlatformError("This python does not have a shared library or framework")
 
             else:
@@ -1132,11 +1126,8 @@
         # XXX - In this particular case we know exactly what we can
         #       get away with.. should this be extended to the general
         #       case?  Per-framework recipes?
-        includedir = None
-        configdir = None
-        if sysconfig is not None:
-            includedir = sysconfig.get_config_var('CONFINCLUDEPY')
-            configdir = sysconfig.get_config_var('LIBPL')
+        includedir = get_config_var('CONFINCLUDEPY')
+        configdir = get_config_var('LIBPL')
 
 
         if includedir is None:
@@ -1516,9 +1507,8 @@
 
         includedir = None
         configdir = None
-        if sysconfig is not None:
-            includedir = sysconfig.get_config_var('CONFINCLUDEPY')
-            configdir = sysconfig.get_config_var('LIBPL')
+        includedir = get_config_var('CONFINCLUDEPY')
+        configdir = get_config_var('LIBPL')
 
 
         if includedir is None:
@@ -1582,11 +1572,8 @@
             os.unlink(site_path)
 
 
-        includedir = None
-        configdir = None
-        if sysconfig is not None:
-            includedir = sysconfig.get_config_var('CONFINCLUDEPY')
-            configdir = sysconfig.get_config_var('LIBPL')
+        includedir = get_config_var('CONFINCLUDEPY')
+        configdir = get_config_var('LIBPL')
 
 
         if includedir is None:
@@ -1650,11 +1637,8 @@
             os.unlink(site_path)
 
 
-        includedir = None
-        configdir = None
-        if sysconfig is not None:
-            includedir = sysconfig.get_config_var('CONFINCLUDEPY')
-            configdir = sysconfig.get_config_var('LIBPL')
+        includedir = get_config_var('CONFINCLUDEPY')
+        configdir = get_config_var('LIBPL')
 
 
         if includedir is None: