Commits

Ronald Oussoren committed dae1e98 Merge

merge 0.7 branch, fixes #96

  • Participants
  • Parent commits d655023, 70438e6

Comments (0)

Files changed (2)

File doc/changelog.rst

 - Issue #97: Fixes a problem with the pyside and sip recipes when the 'qt_plugins'
   option is used for 'image_plugins'.
 
+- Issue #96: py2app should work with python 2.6 again (previous releases didn't
+  work due to using the sysconfig module introduced in python 2.7)
+
 py2app 0.7.3
 ------------
 

File py2app/build_app.py

 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:
             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:
         # 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:
             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: