Note that there are some explanatory texts on larger screens.

plurals
  1. POPy2app keyflag error CFLAGS
    primarykey
    data
    text
    <p>What I'm trying to do is compile a program I've written in Python 2.7, using pygame, into a standalone app for Mac computers. I'm working on a PC running Windows 8 with no access to a mac, so tweaking the process has been difficult.</p> <p>When I run the setup file from the command prompt, I get the "text flood" (similar to what py2exe gave me when it worked to compile the windows version) and the program appears to work. It creates build and dist folders, but the dist folder has no contents. When looking at the command prompt output, the last two lines are BASE_CFLAGS = cfg['CFLAGS'] Key Error: 'CFLAGS' This seems to happen when py2app is trying to create the application bundle.</p> <p>Here is the setup.py file I've gotten to thus far:</p> <pre><code> """ Script for building the example. Usage: python setup.py py2app """ from setuptools import setup NAME = 'PetCute Slide Puzzle Test' VERSION = '0' plist = dict( CFBundleIconFile=NAME, CFBundleName=NAME, CFBundleShortVersionString=VERSION, CFBundleGetInfoString=' '.join([NAME, VERSION]), CFBundleExecutable=NAME, CFBundleIdentifier='Py2App and PyGam test', ) setup( data_files=['Dog1.jpg', 'Dog2.jpg', 'Dog3.jpg', 'Dog4.jpg', 'Dog5.jp', 'Dog6.jpg', 'Dog7.jpg', 'Dog8.jpg', 'Dog9.jpg', 'Dog10.jpg', 'Dog11.jpg', 'Dog12.jpg', 'Dog13.jpg', 'Dog14.jpg', 'Dog15.jpg', 'Dog16.jpg', 'AYearWithoutRain.ttf'], app=[ dict(script="PetCute_slidepuzzle.py", plist=plist), ], setup_requires=["py2app"], ) </code></pre> <p>The data_files lists out the pictures and text file that need to be bundled with the code. I got to this by adapting the alien.py example. Please let me know if any more info is needed!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload