Search code examples
pythonsyntaxsyntax-errorpy2apprequires

Making my python program an application


I am trying to make my python program an application for mac. So I installed the program

py2app

I made my script and then I made my "setup.py" script as a you tube tutorial said. But a error message keeps popping up when I enter the next step in the terminal:

(Here is the step I entered)

python /Users/(my name)/Setup.py py2app

and the error code keeps saying

  File "/Users/jonah/Setup.py", line 8
setup_requires=["py2app"],
             ^

SyntaxError: invalid syntax

here is the code in setup.py:

#Script for building the the app
#USAGE: python setup.py py2app

from setuptools import setup

setup(
    app=["Kirby's Dream Test script.py"]
    setup_requires=["py2app"],
)

How do I make it work? Thanks!


Solution

  • You are missing a , after the app field:

    setup(
        app=["Kirby's Dream Test script.py"], # you need this comma
        setup_requires=["py2app"],
    )