Anonymous avatar Anonymous committed f383f98

support for py2app's bgdist_mpkg command

Comments (0)

Files changed (2)

+import bdist_mpkg
+from distutils.command.bdist_mpkg import bdist_mpkg as _bdist_mpkg
+FRAMEWORKS = ['SDL', 'SDL_ttf', 'SDL_image', 'SDL_mixer', 'smpeg']
+class bdist_mpkg(_bdist_mpkg):
+    def initialize_options(self):
+        _bdist_mpkg.initialize_options(self)
+        self.scheme_descriptions['examples'] = u'(Optional) pygame example code'
+        self.scheme_map['examples'] = '/Developer/Python/pygame/Examples'
+        self.scheme_copy['examples'] = 'examples'
+        for framework in FRAMEWORKS:
+            self.scheme_descriptions[framework] = u'(Required) %s.framework' % (framework,)
+            self.scheme_map[framework] = '/Library/Frameworks/%s.framework' % (framework,)
+            self.scheme_copy[framework] = '/Library/Frameworks/%s.framework' % (framework,)
+cmdclass = {'bdist_mpkg': bdist_mpkg}
     "long_description": DESCRIPTION,
+cmdclass = {}
 import sys
 if not hasattr(sys, 'version_info') or sys.version_info < (2,2):
     raise SystemExit, "Pygame requires Python version 2.2 or above."
+    import bdist_mpkg_support
+except ImportError:
+    pass
+    cmdclass.update(bdist_mpkg_support.cmdclass)
 #get us to the correct directory
 import os, sys
         self.install_dir = getattr(install_cmd, 'install_lib')
+cmdclass['install_data'] = smart_install_data
 #call distutils with all needed info
-       "cmdclass":    {'install_data': smart_install_data},
+       "cmdclass":    cmdclass,
        "packages":    ['pygame'],
        "package_dir": {'pygame': 'lib'},
        "headers":     headers,
        "data_files":  [['pygame', data_files]],
-apply(setup, [], PACKAGEDATA)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.