Skip to content

Instantly share code, notes, and snippets.

@mshafae
Created May 13, 2021 22:22
Show Gist options
  • Save mshafae/da0108cbd9c7e959591b9c9eb1746801 to your computer and use it in GitHub Desktop.
Save mshafae/da0108cbd9c7e959591b9c9eb1746801 to your computer and use it in GitHub Desktop.
example Pygame setup.py py2app setup.py demo.
"""
This is a setup.py script generated by py2applet
Usage:
python setup.py py2app
"""
import py2app.recipes
import py2app.build_app
from setuptools import find_packages, setup
pkgs = find_packages(".")
class recipe_plugin(object):
@staticmethod
def check(py2app_cmd, modulegraph):
local_packages = pkgs[:]
local_packages += ['pygame', 'data']
return {
"packages": local_packages,
}
py2app.recipes.my_recipe = recipe_plugin
APP = ['snake.py']
DATA_FILES = []
OPTIONS = {}
OPTIONS.update(
iconfile="data/Icon.icns",
plist=dict(CFBundleIdentifier='edu.fullerton.ecs.mshafae')
)
setup(
name="Snake++",
app=APP,
data_files=DATA_FILES,
include_package_data=True,
options={'py2app': OPTIONS},
setup_requires=['py2app'],
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment