Diff of /Lib/plat-mac/buildtools.py [06c261] .. [ca568f] Maximize Restore

Repo status: analyzing...

  Switch to side-by-side view

--- a/Lib/plat-mac/buildtools.py
+++ b/Lib/plat-mac/buildtools.py
@@ -293,6 +293,15 @@
         dft_icnsname = os.path.join(sys.prefix, 'Resources/Python.app/Contents/Resources/PythonApplet.icns')
         if os.path.exists(dft_icnsname):
             icnsname = dft_icnsname
+        else:
+            # This part will work when we're in the build environment
+            import __main__
+            dft_icnsname = os.path.join(
+                    os.path.dirname(__main__.__file__),
+                    'PythonApplet.icns')
+            if os.paht.exists(dft_icnsname):
+                icnsname = dft_icnsname
+
     if not os.path.exists(rsrcname):
         rsrcname = None
     if progress: